0% found this document useful (0 votes)
28 views2 pages

Paper G Data Structure 23-12-24

Comp

Uploaded by

printaprintable
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

Paper G Data Structure 23-12-24

Comp

Uploaded by

printaprintable
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

COMPUTER SCIENCE

Duration3:00 Hours Data Structure Marks100

Question 1 [10]
A) What is Stack? Give an real life example for stacking

B) What is Queue? Give an real life example

C) What is Link list? How it differs from Stack?

D) What is Tree? Draw a Binary tree showing 3 levels

E) Write two differences between linear and non linear structure

Question 2 [10]
A) Convert the following Infix expression to Postfix Expression. Show Table
(A+B*C) ^ (A%B+C*D) ^ (A+B*C^D)

B) Evaluate the following Postfix Expression. Show Table


5, 2, +, 8, 4, -, *, 10, 8, 6, -, /, *

C) Evaluate the following Postfix Expression. Show Table


5, 2, >, 8, 4, <, AND, 10, 8, >, 6, 4, >, AND, OR, NOT

D) Convert the following Infix expression to Postfix Expression. Show Table


((5-3)/(4+2)) ^ (6-2+8-5) ^ (9/3*6%3)

E) Evaluate the Expression of Question 2D. Show Table

Question 3 [25]
A) Write an algorithm to add an element in a dynamic stack

B) Write an algorithm to delete an element from a dynamic Queue

C) Write an algorithm to traverse a doubly link list in reversed order. Assume TAIL
pointer is pointing to the last node of the doubly link list

D) Write an algorithm to do ainorder traversal of a Binary Tree

E) Write an algorithm to remove an element from a priority Queue

Question 4 [25]
A) Write a function to insert a element in link list. Assume addAtBegin(int) and
addAtEnd(int) functions already exist to call

B) Write a function to remove a node from a binary tree

C) Write a function to reverse a sentence using stack

D) Create a function to store names in Ascending order in a queue

E) Write a function to remove the first element from a double link list.

Question 5 [30]
A) Draw a stack representation of the following
a. Push the numbers 10,20,30
b. Pop an element
c. Display the count of the stack
d. Push the numbers 25, 30
e. Display the peak

George  93 2236 2146 [email protected] f/GeorgeComputerTuition 23/12/24 Page: 1


COMPUTER SCIENCE
Duration3:00 Hours Data Structure Marks100

B) Draw a Queue representation of the following


a. Add the numbers 10,20,30
b. Display the content of the queue
c. Add the numbers 40, 50
d. Remove two elements
e. Display the count of the queue

C) Draw a tree representation of the following


a. Add the numbers 50,25,75,15,65
b. Do a Postorder traverse
c. Remove the number 50
d. Do a Preorder traverse
e. Add the numbers 10,20,80,90

George  93 2236 2146 [email protected] f/GeorgeComputerTuition 23/12/24 Page: 2

You might also like