reversing the linked list, and implementing queue using two stacks
Anonymous
Both of them are standard questions. I reversed linked list using two pointers, one for previous and one for current. And implemented queue using two stacks in O(n) update time
Check out your Company Bowl for anonymous work chats.