wu :: forums
« wu :: forums - Steque »

Welcome, Guest. Please Login or Register.
May 15th, 2024, 9:46am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: towr, william wu, Icarus, ThudnBlunder, Grimbal, SMQ, Eigenray)
   Steque
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Steque  (Read 5488 times)
Skandh
Junior Member
**





   


Gender: male
Posts: 77
Steque  
« on: Aug 30th, 2011, 4:46am »
Quote Quote Modify Modify

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: male
Posts: 2084
Re: Steque  
« Reply #1 on: Aug 30th, 2011, 4:54am »
Quote Quote Modify 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

Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board