From a96b65cbfad7f62f3db6b2eab105e4e25c0414c5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 27 Jun 2025 12:23:02 -0600 Subject: chore: remove old cpp and rust solutions --- other/implement_queue_stacks.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 other/implement_queue_stacks.cpp (limited to 'other/implement_queue_stacks.cpp') diff --git a/other/implement_queue_stacks.cpp b/other/implement_queue_stacks.cpp deleted file mode 100644 index 551ce9f..0000000 --- a/other/implement_queue_stacks.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "leetcode.h" - -class MyQueue { -public: - stack input, output; - void push(int x) { input.push(x); } - int pop() { - int x = output.top(); - peek(); - return x; - } - int peek() { - if (output.empty()) - while (input.size()) - output.push(input.top()), input.pop(); - return output.top(); - } - bool empty() { return input.empty() && output.empty(); } -}; - -int main() { - MyQueue *obj = new MyQueue(); - obj->push(2); - int param_2 = obj->pop(); - int param_3 = obj->peek(); - bool param_4 = obj->empty(); - cout << param_2 << endl << param_3 << endl; - if (param_4) - cout << "true"; - else - cout << "endl"; -} -- cgit v1.2.3