leetcode/src/implement_queue_using_stacks at master · SolutionYogi/leetcode · GitHub
Skip to content

Latest commit

 

History

History
 
 

Folders and files

Problem

Implement the following operations of a queue using stacks.

push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front of queue. peek() -- Get the front element. empty() -- Return whether the queue is empty.