-
Notifications
You must be signed in to change notification settings - Fork 268
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Need following functions in queue:
File location - Queue
- empty() – Returns whether the queue is empty.
- size() – Returns the size of the queue.
- front() – Function returns a the first element of the queue.
- back() – Function returns a the last element of the queue.
- push(g) – Function adds the element ‘g’ at the end of the queue.
- pop() – Function deletes the first element of the queue.
Example:
Queue q = [1,2,3,4,5,6];
q.empty() false
q.size() 6
q.front() 1
q.back() 6
q.push(10) [1, 2, 3, 4, 5, 6, 10]
q.pop() [2, 3, 4, 5, 6, 10]
ashokdey
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request