You are viewing a single comment's thread. Return to all comments →
Easy C# Solution
Stack<char> stack = new Stack<char>(); Queue<char> queue = new Queue<char>(); void pushCharacter(char ch) { stack.Push(ch); } void enqueueCharacter(char ch) { queue.Enqueue(ch); } public char popCharacter() { return stack.Pop(); } public char dequeueCharacter() { return queue.Dequeue(); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 18: Queues and Stacks
You are viewing a single comment's thread. Return to all comments →
Easy C# Solution