Skip to content
VUBuddy

CS301 Midterm Past Papers by Junaid

Data Structures PDF 1.1 MBUpdated 23 Oct 2026
Midterm past paper CS301 Midterm Past Papers by Junaid PDF 1.1 MB
vubuddy.com
Type
Midterm past paper
Course
CS301 Data Structures
Size
PDF 1.1 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1.1 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 2, 3, 4 of 39. Download the file for all 39 pages.

  1. Consider the following infix expression. 7/8+9 If one converts the above expression into postfix, what would be the resultant expression? a. 789/+ b. 78/+9 c. /78+9 d. 78/9+

Q2. Suppose there are 100 elements in an equivalence classes so initially there will be 100 tree. The collection of tree is called_

  1. Cluster
  2. Class
  3. Forest
  4. Bunch

Q3. For a perfect binary tree of height h, having N nodes the sum of height of nodes is

  1. N-h-1
  2. N-1
  3. N-1+h
  4. -(h-1)

Q4. Sorting procedure normally takes ______time

  1. N log N
  2. 2 N
  3. N*N*N
  4. N

Q5. there are 100 elements in an equivalence classes then will have ______state initially

  1. 50
  2. 100
  3. 1000
  4. 80

Q6. ________ objects (objects accessed by pointers) are called anonymous objects.

  1. Private
  2. Nameless
  3. Friend
  4. Public

Q7. ___________ is a self-balancing tree.

  1. AVL
  2. Binary Tree
  3. Binary Search Tree
  4. ALV

Q8. Which of the following operation returns but do not removes top value of the stack?

  1. Push
  2. Pop
  3. Top
  4. First
  5. Int htdiff = height(root->getLeft()) __________ height(root->getRight()); The above line of code is taken from AVL insert method. Complete it by selecting an appropriate symbol.
  1. -
  2. +
  3. /
  4. *

10. Which operation of the queue data structure is used to insert an element into the Queue? a. Enqueue() b. Dequeue() c. Fornt() d. Remove() 11. For making binary search tree for strings we need, ________ data type. a. Char b. Int c. Float d. Double 12. Local variables defined inside function body are ________ automatically at the end of function execution. a. Created b. Destroyed c. Incremented d. Decremented

Q9. If a node has three fields, then this node will be related to

  1. Linked list
  2. Doubly linked list
  3. Circular linked list
  4. All of the given

10. ________ is an area in computer memory that is allocated dynamically. a. Heap b. Stack c. Queue d. Linked list 11. Linked list use _______ to store data. a. Array b. 2-D Array c. Variables d. Linked Memory 12. The lifetime of a transient object cannot exceed that of the application. a. True b. False c. In some cases d. None of the given 13. To represent hierarchical relationship between elements, which data structure is suitable? a. Dequeue b. Priority c. Stack d. Tree 14. Local variables of a function are stored in, a. Binary search tree b. Stack c. Queue d. AVL tree 15. In-order traversal method traverses tha data in a. Non sorted order b. Random order c. Sorted order

All CS301 files →
CS301 Data Structures All CS301 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.