We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Queue using Two Stacks
- Discussions
Queue using Two Stacks
Queue using Two Stacks
Sort by
recency
|
223 Discussions
|
Please Login in order to post a comment
Java
Following is a single stack solution for those who are interested
public static void main(String[] args) {
Python solution, i tried use the more pure stack definition.
well this is the JavaScript solution but i'm not sure if i'm supposed to be using the Array shift and push if anybody else got a better idea please let me know thanks:
Swift
Full swift solution as the hackerrank managed part to parse input is missing: