Q. Show the status of deque after each operation
peek()
insertFront(12)
insertRear(67)
deletionFront()
insertRear(43)
deletionRear()
deletionFront()
deletionRear()
Answer :-
deque = [ ]
peek()
None
insertFront(12)
deque = [ 12 ]
insertRear(67)
deque = [ 12 , 67 ]
deletionFront()
deque = [ 67 ]
insertRear(43)
deque = [ 67 , 43 ]
deletionRear()
deque = [ 67 ]
deletionFront()
deque = [ ]
deletionRear()
Under Flow
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )