MORE IN Data Structures & Algorithms
SPPU Electronics and Telecom Engineering (Semester 3)
Data Structures & Algorithms
December 2016
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary

Solve any one question fromQ.1(a,b) and Q.2(a,b)
1(a) Write a C function with and without pointers to arrays for checking whether the given string is a Palindrome or not.
6 M
1(b) Write a C function for the Binary search. Compare the time complexities of Linear, Binary and Fibonacci search.
6 M

2(a) Explain parameter passing by value & by reference with example of swapping of two values.
6 M
2(b) Sort the following numbers 75, 15, 58, -5, -22, 34, 54, 28, 27, 1 using:
i) Bubble Sort
ii) Merge sort
6 M

Solve any one question fromQ3(a,b) and Q.4(a,b)
3(a) Identify the expressions and convert them into remaining two forms:
i) AB+C*DE-FG++$ii) -A/B*C$DE
Note:\$ = Exponent operator
7 M
3(b) Define queue. What are conditions for the queue empty and queue full when queue is implemented using Array? Explain.
6 M

4(a) Write a function PUSH and POP in "C" for stack using Linked List.
7 M
4(b) A doubly linked list with numbers to be created. Write node structure and algorithm to create the list.
6 M

Solve any one question fromQ5(a,b) and Q.6(a,b)
5(a) Construct the Binary Search Tree (BST) from following elements:
5, 2, 8, 4, 1, 9,7
Also show preorder, inorder and postorder traversal for the same.
6 M
5(b) Explain with suitable example hoe Binary Tree can be represented using:
i) Array
6 M

6(a) Construct Binary Search Tree (BST) for the following:
MAR, MAY, NOV, AUG, APR, JAN, DEC, JUL, FEB, JUN, OCT, SEPT
6 M
6(b) Write a Recursive 'C' function for Preorder and Postorder traversal of a Binary Search Tree.
6 M

Solve any one question fromQ.7(a,b) and Q.8(a,b)
!mage
7 M
7(b) Defien DFS and BFS graph with example.
6 M

8(a) Findout the Minimum Spanning Tree of the following graph Figure(2) using:
i) Prim's Algorithm
ii) Kruskal's Algorithm
!mage
7 M
8(b) Explain Dijkstar's Algorithm with example.
6 M

More question papers from Data Structures & Algorithms