Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help2200


This forum is provided to promote discussion amongst students enrolled in Data Structures and Algorithms (CITS2200).
 
Options:
RSS cloud
Jump to:

Lab 3 Deque Cyclic

2 of 251 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Fri 27th Mar, 7:38pm
Actions: 
        Login-to-reply
Hi,
I have a few questions on certain aspects of the deque methods. Lets say I had a 
deque with a size of 5,

1) If I only pushLeft() twice, would peekLeft() and peekright() be the same.

2) If I only pushLeft() twice, would popLeft() and popRight() remove the same object.

Lab 3 Deque Cyclic

photo
From: Andrew G.
Date: Wed 1st Apr, 9:54am
Actions: 
        Login-to-reply
1) No. If there are two elements in the queue then the leftmost and rightmost elements 
must be different.

2) No. See above.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020