You are viewing a single comment's thread. Return to all comments →
In C#
Stack<char> palStack; Queue<char> palQueue; public Solution(){ palStack = new Stack<char>(); palQueue = new Queue<char>(); } public void pushCharacter(char c){ palStack.Push(c); } public char popCharacter(){ return palStack.Pop(); } public void enqueueCharacter(char c){ palQueue.Enqueue(c); } public char dequeueCharacter(){ return palQueue.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 →
In C#