Sie sind auf Seite 1von 11

November 2010

3. a) Explain the linked list implementation od stacks.


b) What are basic queue operations? Explain them.
c)Identify wheter the following are:
i) Trees
ii) Binary Trees
iii) Strictly binary
iv) Complete binary or almost complete binary.

4.a) State and explain the maketree and setleft functions for dynamic mode
representation of binary trees.
b) What is threaded binary tree. Give an example.
c) Explain the representation of balanced trees in C.
d) Explain any one of the tree traversal methods.

May/June 2010

3 .a) Define stack. State and explain the code for checking empty or overflow
conditions of stack.
b) Write short notes on :
i) queues
ii)circular queues
iii)priority queues.
c) Write a C program to perform push and pop operations on a stack.
d) Define binary trees, strictly binary trees and complete binary tree.

4. a) Explain the operations used in constructing a binary tree.


b) Explain balanced trees with an example.
c) State the steps in the three traversal methods of a binary tree.Perform them
for the following tree.

d) Explain with an example and diagrams the structure for tree node using array
implementation and
where all sons of a node or linked together in a linear list.

November 2009

3. a) Provide algorithm to determine :


i) number of nodes in a binary tree
ii) depth of a binary tree
iii) sum of all the elements in a binary tree.

b) What is a circular queue? Write a program to insert an item in circular queue.


Write a function for printing elements of a queue in reverse order.

c) Why stack is called as a pushdown list? List its applications.

4. a) Traverse the following tree in preorder, postorder and inorder. Provide


algorithm for postorder traversal.

b) Discuss advantages of linked list over arrays for implementation of stack data
structures.

c) What is a priority queues? What are the different types of priority queues? What
are its
applications?

May/June 2009

3. a) What is a B-Tree ? Give an example. Construct a B-tree of order 4 by inserting


following elements :
10, 24, 23, 31, 16, 26, 35, 29, 20 ,46
b) What is a threaded Binary tree ? What are its advantages?
c) Write a function called Copystack that copies the contents of one stack into
another. The function must have 2 arguments of type stack and one for destination
stack.

4. a) Write a program to implement ascending priority queue ? Provide all necessary


functions.
b) Explain with examples :
i) Almost complete binary tree
ii) Threaded binary tree.
c) What is a circular queue ? What are its applications? What are its advantages
over simple queues?

Nov/ Dec 2014

3 a) Explain the following terms:


i)
ii)
iii)

Infix expression
Polish notations
Reverse polish notation.

b)What do you mean by queue ? define insert and delete operations performed by
queue.
c) Write the function in C to implement the following operations on a Binary Tree:
i) Inorder Traversal
ii) Pre-order Traversal
iii)Post order Traversal.
d) Explain Threaded Binary Tree with example.

4. a) A binary Tree T has 9 nodes , The inorder and pre-order traversals are given as
follows:
Inorder :
Pre Order :

EACKFHDBG
FAEKCDHGB

Draw the tree T.


b) Explain the implementation of operations in a circular queue.
c) Write a program in C to implement Push and Pop operations.

May/June 2013

3. a) Write a C program to implement push and pop operation of a stack.


b) Suppose the following alphabets are inserted in order on the empty BST.
PMSWFINGJQ
Draw the BST.
c) Transform the following to infix :
i) + - + ABCD
ii) ABCD+ - +
iii) */-A+CBDE
d)What are threaded trees?

4. a) Write an algorithm for inserting an item a a deque.


b)Construct a binary tree for (A+(B-C) * (D-E)/(G/H)) - (F$I) and hence find
preorder ,postorder
,inorder and level order traversals.
c) Evaluate the following postfix expression:
i) 9 8 7*+
ii) 40 25 +20 5*3 +
iii) 21 18 8^/9 +

Nov/Dec 2012

3. a) What is a Stack ? What are operations that are performed on stack ?


b) Write a C program tom reverse a number using stack?
c) Write C functions to insert and delete an element from a linear queue(use
array representation).
d) Compare the following
i) Circular queue
ii) Linear queue.
4. a) Give the pre order ,post order and in order traversal for the following binary
tree

b) Define strictly binary tree and complete binary tree.


c) What is threaded binary tree ? Give the function maketree (x) to create a
node of a right inthreaded tree.
d) Define Balanced binary tree. Give an example

May/June 2012

3. a) State and explain the basic stack operation.


b) Assume that there are two stacks containing integer numbers,write a function
that inserts the given
integer number into the stack with less number of elements.If two stacks
contain equal number of
element the item goes into the first stack. The function also returns the total
number of elements
in both of the stacks.
c) Explain linked implementation of circular queues.
d) Write the code to insert and delete elements of a linear queue implemented
using linked list.

4.a) Perform the tree traversal methods for the following binary tree.Give C routine
for any one method.

b) Write short note on balanced trees.


c) Explain the basic operations performed on queue.
d) Write a C code for the linked list implementation of stack

November 2011

3. a) Write a C code for linked list implementation of stack


b) Write C code for array implementation of Queues.
c) Write C code for all three traversal methods of a binary tree.Also apply the
same for the following
tree.

4. a) Explain balanced trees with an example .

b) Write C code for any three primitive operations on Binary Tree.


c) Define
i) strictly binary tree
ii) complete binary tree
iii) Almost complete binary tree
d) What is threaded Binary tree? What are its advantages?

May/June 2011

3. a) Explain the concept of Stack. Explain basic operations performed on stack.


b)What are basic Queue operations? Write a program to implement circular
Queues.
c) What are the advantages of circular queues over simple queues?
d) What is threaded Binary tree? What are its advantages?

4. a) Perform the tree traversal methods for the following binary tree.

b) Write C routines for any two traversal methods for the binary tree.
c) Define strictly binary trees and complete binary tree.
d) Provide C implementations of the binary tree operations under the dynamic
node representation
for maketree(x) function and setleft(p,x) function.

Das könnte Ihnen auch gefallen