Skip to content

Latest commit

 

History

History
8 lines (7 loc) · 253 Bytes

File metadata and controls

8 lines (7 loc) · 253 Bytes

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.