code is required - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# code is required

Posts: 147Member
[b][red]This message was edited by dolev9 at 2005-4-27 14:13:7[/red][/b][hr]
hey

i just found that 11 days from now i got pascal examination test.
ill be glad if poeple will give me links to codes about the next topics:

1)binary trees
2)queues(as an array)
3)stack(as an array)
4)record that calls itself like (can you tell me please how its called)
b = ^a
a = record
c : b
end;
5)recursion
6) recursion
like
procedure a;
begin
if ...
then b;
end;

procedure b;
begin
if...
then a;
end;

thx very much

dolev

• Posts: 757Member
: [b][red]This message was edited by dolev9 at 2005-4-27 14:13:7[/red][/b][hr]
: hey
:
: i just found that 11 days from now i got pascal examination test.
: ill be glad if poeple will give me links to codes about the next topics:
:
: 1)binary trees
: 2)queues(as an array)
: 3)stack(as an array)
: 4)record that calls itself like (can you tell me please how its called)
: b = ^a
: a = record
: c : b
: end;
: 5)recursion
: 6) recursion
: like
: procedure a;
: begin
: if ...
: then b;
: end;
:
: procedure b;
: begin
: if...
: then a;
: end;
:
: thx very much
:
: dolev

Well to give you a very brief explanation of 2 & 3 (Queues & Stacks), the main difference is how they are handled.

Queues are handled FIFO (First-In First-Out). Another words, whatever goes into the Queue first comes out first. For example a network printer is handled on a queue. the first person to send a print job gets printed first, then each person in sequence. It would make no sense to have a Print Stack. Which brings us to stacks.

Stacks are handled FILO (First-In Last-Out). So whatever goes in first gets buried by the next. For example, stack building blocks one on top of another. If you want the bottom one, you must first take all the blocks off the top before you can get it. This may seem useless, but it makes sense for lots of things.

I'll leave the other ones for now,

Phat Nat