stack

Write here if you have problems with your Pascal source code

Moderator: Board moderators

Post Reply
*luna*
New poster
Posts: 6
Joined: Tue Jan 11, 2005 9:12 pm
Location: Slovenia
Contact:

stack

Post by *luna* »

I just wanna know it anybody can help me with making stack (first in last out) in pascal.

Thanks!
Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong

Post by Observer »

You can use an array:

Code: Select all

                     top
_______________________________
| 10 | 20 | 15 | 40 | 25 | -- |
Or you may also try linked list.

Code: Select all

                                          top
______    ______    ______    ______    ______    ______
| 10 | -> | 20 | -> | 15 | -> | 40 | -> | 25 | -> | -- |
Is that what you mean? :wink:
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
*luna*
New poster
Posts: 6
Joined: Tue Jan 11, 2005 9:12 pm
Location: Slovenia
Contact:

Post by *luna* »

yes, thanks... good idea 8)
Post Reply

Return to “Pascal”