Author |
Topic: Steque (Read 5541 times) |
|
Skandh
Junior Member
 

Gender: 
Posts: 77
|
I was going through 'Algorithms' by Robert Sedgewick. I found Data Type Steque defined as : "A stack-ended queue or steque is a data type that supports push, pop, and enqueue." I am not able to visualize this data type. Isn't enqueue() and push() are same operation with this data type or if not how are they different. And what is "stack-ended queue"? This phrase needs some elaboration. Thanks.
|
|
IP Logged |
I wanna pull by legs!!!
|
|
|
SMQ
wu::riddles Moderator Uberpuzzler
    

Gender: 
Posts: 2084
|
 |
Re: Steque
« Reply #1 on: Aug 30th, 2011, 4:54am » |
Quote Modify
|
Enqueue would add an item to the bottom of the stack, rather than the top. So a steque supports adding items at either end, but removal from only one end. --SMQ
|
|
IP Logged |
--SMQ
|
|
|
|