e-law -1 Newbie Poster

i have to this the data structure and algorithm past question to solve and i am find difficult in some of the question. these are some of the questions

1. Draw the internal memory respresentaion of a binary tree using the linked - list structure.

2. if a 2-dimensional array if 8 rows and 11 columns were stored in row major order, beginning at the memory address 25, what would be the address of the entry in the 3rd row, 6th column, if each entry occupied 23 memory cells.

3. Using the tree and the procedure below, what will be the output after the procedure visiteme is called assuming each represented in memory by three fields to hold the link left subtree, data and a link to the right subtree?

Procedure Vistime (Pointer,Link)
begin
if pointer=nil then
begin
write (data(pointer));
visiteme(rbranch(pointer));
visiteme(lbranch(pointer));
end
end;

i. Where pointer is a link to the tree, rbranch and lbranch represent to the left and right subtrees respectively.

ii. if the nested parenthesis representation of a tree is a follows, then what is the graphical representation of the tree.


3. Write and algorithm in C++ to insert on a stack. if the stack is STACK with the size n and athe item be inserted as ITEM and TOP as the top pointer.

Draw the internal memory representation of the binary tree below using
a. sequential
b. linked structures.

Write an algorithm to
1. Delete the Kth element in the list
2. insert an element Y immediately after kth element

jonsca commented: Don't jump into a thread that doesn't belong to you -1