PYQ – DATA STRUCTURES AND ALGORITHM (2418301) | SEMESTER 3RD (2ND YEAR) | Year 2023

Share:WhatsAppTelegram
Question 1

Data Structure & Algorithmm 2023 OLD PYQ.


Group A

 

Choose the most suitable answer from the following options: -   (1*20=20)


(i) Now do you initialize an array in C?

(a) int arr [3]= (1,2,3);

(b) int arr (3)= {1,2,3};

(c) int arr [3]= {1,2,3};

(d) int arr (3)= (1,2,3);


(ii) Time complexity of linear search is

(a) O(n)

(b) O(n2)

(c) O(n3)

(d) O(logn)


(iii) LIFO used in

(a) Queue

(b) Stack

(c) Tree

(d) Graph


(iv) Process of inserting an element in stack is called

(a) create                                  

(b) Push

(c) Evaluation

(d) Pop


(v) Process of deletion of an element in stack is called 

(a) create

(b) Push

(c) Evaluation

(d) Pop


(vi) What is the complexity of searching for a particular element in singly linked list?

(a) O(n)

(b) O(1)

(c) log(n)

(d) nlog(n)


(vii) Binary tree can have how many children?

(a) 2

(b) any number of children

(c) O or 1 or 2

(d) O or 1


(viii) What is the time complexity of pre-order traversal in the iterative fashion?

(a) O(1)

(b) O(n)

(c) O(log n)

(d) O(n logn)


(ix) Quick sort can be categorized into which of the following?

(a) brute force technique

(b) divide and conquer

(c) greedy algorithm

(d) dynamic programming

 
(x) What is the number of edges present in a complete graph having n vertices?

(a) n(n+1)/2

(b) n(n-1)/2

(c) n

(d) none

 
(xi) In a stack, if a user ties to remove an element from an empty stack it is called

(a) underflow

(b) empty collection

(c) over flow

(d) garbage collection


(xii) What is the value of the post fix expression 6 3 2 4 + -*?

(a) 1

(b) 40

(c) 74

(d) 18


(xiii) The post fix from of A*B+C/D is

(a) *AB/CD+

(b) AB*CD/+

(c) A*BC+/D

(d) ABCD+/*


(xiv) The data structure required for Breadth first traversal on a graph is?

(a) stack

(b) Array

(c) Queue

(d) Tree

 
(xv) Which data structure is needed to convert infix notation to postfix notations?

(a) Branch

(b) Tree

(c) Queue

(d) Stack


(xvi) A Queue follows------

(a) FIFO

(b) LIFO

(c) Both (a) and (b)

(d) None


(xvii) Malloc function is

(a) Dynamic memory allocation function

(b) static memory allocation function

(c) both (a) and (b)

(d) none


(xviii) What would be the asymptotic time complexity to find an element in the linked list

(a) O(1)

(b) O(n)

(c) O(n2)

(d) O(n4)


(xix) A variable that holds the address of another variable is

(a) Array

(b) Printer

(c) Stack

(d) Queue


(xx) The time complexity of Quicksort is

(a) O(n)

(b) O(n2)

(c) O(n log n )

(d) O(n3)

 

Group:-"B"

➥ Answer all Five Questions: -                         (5*4=20) 

 

2. What do you mean by complexity?

                                                                             OR

What is Abstract Data type?

 

3. Write difference between row major and column major 

OR

Discuss merge sort algorithm with example.

 

4. Define infix, prefix and postfix with examples. 

OR

Define stack and its operation

 

5. What is double linked list? Explain with proper diagram

OR

What are advantages and disadvantages of double linked list?

 

6. What is in order and post order traversal with example? 

OR

Define Queue and its operation.

 

Group:- "C"

➥ Answer all Five Questions: -                         (5*6=30) 

 

7. Explain Quick sort algorithm using suitable example.

OR

Define following:-

        a) Binary search tree

        b) AVL tree

 

8. Explain “Queue Overflow” and “Queue underflow” 

OR

Discuss different types of queue in detail.

 

9. Explain tree and graph with proper diagram.  

OR

Discuss Binary search in detail.

 

10. Explain Tow dimensional array. How two-dimensional array can be represented in memory?   

OR

Writhe a program to insert a node at the beginning of linked list (in C language)

 

11. Distinguish between best, worst and average case complexities of an algorithm in detail.  

OR

Write a program to delete a not from the beginning of linked list. (in C language)

 

 

*****

Q1

PYQ Video References

No references available right now.

Comments & Reviews

Loading comments...