Solve any one question.Q1(a,b) Q2(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

15,

58,

-5,

-22,

34,

54,

28,

27,

1 using:

i) Bubble Sort

ii) Merge Sort

6 M

Solve any one question.Q3(a,b) Q4(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

i) AB+C*DE-FG++$

ii) -A/B*C$DE Note: $ = Exponent operator

7 M

3(b)
Define queue. What are conditions for 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.Q5(a,b) Q6(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.

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 how Binary Tree can be represented using:

i) Array

ii) Linked List

i) Array

ii) Linked List

6 M

6(a)
Construct Binary Search Tree(BST) for the following:

MAR,

MAY,

NOV,

AUG,

APR,

JAN,

DEC,

JUL,

FEB,

JUN,

OCT,

SEPT

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.Q7(a,b) Q8(a,b)

7(a)
What do you mean by adjacency matrix and adjacency list? Give the Adjacency matrix and Adjacency list as shown in Figure(1).

!mage

!mage

7 M

7(b)
Define DFS and BFS graph with example.

6 M

8(a)
Find out the Minimum Spanning Tree of the following graph Figure(2) using:

i) Prim's Algorithm

ii) Kruskal's Algorithm

!mage

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