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

DATA STRUCTURE II-I R22 MID-1 (Sep-2024)

Download as doc, pdf, or txt
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 2

KSHATRIYA COLLEGE OF ENGINEERING – B4

II Year B.Tech. - I Sem. (R22), I Mid-Term Examinations, Sep/Oct –


2024
Subject: DATA STRUCTURES Branch : CSE
Time : 2 Hours Max Marks : 30
Name: Hall Ticket No.

PART – A ( Objective / Quiz Paper )

Answer All Questions. 20 x ½ =


10

I. Choose the correct alternative

1. Assuming int is of 4 bytes, what is the size of in arr[15]; [ ]


a) 15 b) 19 c) 11 d) 60
2. In general,the Index of the first element in an array is ____ [ ]
a) 0 b) -1 c) 2 d) 1
3. Elements in an array are accessed [ ]
a) randomly b) Sequentially c) exponentially d) Logarithmically
4. What is the time complexity of pop() when the stack is implemented using an array[ ]
a) O(1) b)O(n) c) O(logn) d) O(nlogn)
5. The Postfix form of the expression (A+B)*(C*D-E)*F/G is [ ]
a) AB+CD*E-FG/** b) AB+CD*E-F**G/ c)AB+CD*E-*F*G/ d) AB+CDE*-*F*G/
6.The data structure requires to check whether an expression contains a balanced
paranthesis is: [ ]
a) Stack b) Queue c) Array d) Tree
7. The postfix formof A*B+C/D is . [ ]
a)*AB/CD+ b) AB*CD/+ c)A*BC+/D d)ABCD+/*
8. Which data structure is used to convert infix notation to postfix notation. [ ]
a) Branch b) Tree c) Queue d) Stack
9. What is the result of the following operation? Top(push(S,X)) [ ]
a) X b) X+S c) S d) XS
10. If the elements A,B,C,D are placed in a queue and are deleted one at a time,in what order
will they are removed? [ ]
a) ABCD b) DCBA c) DCAB d) ABDC
ii. Fill in the blanks
11. The prefix formof A-B/(C*D^E) is ______________________.
12. ADT stands for ________________________________.
13. Accessing the elements from the linked list is possible in ____________ order.
14. __________ operation produce true result when the stack is empty.
15. Insertion operation can be performed from one of the end in the queue is
called _________ end.
16. Time complexity to access the element from the linked list is ________.
17. __________ operation is performed to insert elements into queue.
18. Postfix expression is also called ________________.
19. In Stack using array initial top value will be _________.
20. Functions used in dymanic memory allocation to access heap memory are
__________,_________,__________ and __________.

PART – B ( Descriptive Paper )

Answer any FOUR questions. 4 x 5 = 20

1. Define an Array. Implement the 2-Dimensional array and perform insertion operation on it.
2. Implementation of Stack using Linked list and perform insertion operation at
beginning, end and at Specified position.
3. a.Explain about Linked list. Different types of Linked lists with its logical
representation.
b. Difference between Array and Linked List.
4. Convert the infix expression to prefix expression using Stacks and without stack.
Infix: K+L-M*N+(O^P)*W/U/V*T+Q.
5. Convert the infix expression to postfix expression using Stacks and without stack.
Infix: A-B+(M^N)*(O+P)-Q/R^S*T+Z.
6. Evaluate the given Infix expression to prefix and postfix.
Infix expression: a+b*c-d/e^f value given are a=2, b=3, c=4, d=16, e=2,f=3.

You might also like