Skip to content
VUBuddy

CS521 Midterm Preparation by ZB

Web Systems and Technologies PDF 691 KBUpdated 23 Oct 2026
Midterm past paper CS521 Midterm Preparation by ZB PDF 691 KB
vubuddy.com
Type
Midterm past paper
Course
CS521 Web Systems and Technologies
Size
PDF 691 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 691 KB

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 18. Download the file for all 18 pages.

Q1. Which data structure uses LIFO (Last In, First Out)?

  1. Queue
  2. Stack
  3. Linked List
  4. Tree

Answer: b) Stack

Q2. Which of the following is a disadvantage of an array?

  1. Fast access to elements
  2. Fixed size
  3. Supports dynamic memory allocation
  4. Simple to implement

Answer: b) Fixed size

Q3. In a binary search tree (BST), the left child of a node has a value that is:

  1. Greater than the parent node
  2. Smaller than the parent node
  3. Equal to the parent node
  4. None of the above

Answer: b) Smaller than the parent node

Q4. What is the time complexity of accessing an element in an array?

  1. O(log n)
  2. O(n)
  3. O(1)
  4. O(n log n)

Answer: c) O(1)

Q5. Which of the following is a stable sorting algorithm?

  1. Quick Sort
  2. Merge Sort
  3. Heap Sort
  4. Selection Sort

Answer: b) Merge Sort

Q6. Which algorithm is used for finding the shortest path in a weighted graph?

  1. BFS
  2. DFS
  3. Dijkstra’s Algorithm
  4. Kruskal’s Algorithm

Answer: c) Dijkstra’s Algorithm

Q7. Which of the following is not a characteristic of a queue?

  1. FIFO (First In, First Out)
  2. Operations are performed at the front and rear
  3. Supports both insertions and deletions at any position
  4. Used for scheduling processes

Answer: c) Supports both insertions and deletions at any position

Q8. What is the space complexity of an algorithm that uses constant space?

  1. O(1)
  2. O(n)
  3. O(n^2)
  4. O(log n)

Answer: a) O(1)

Q9. In a hash table, a collision occurs when:

  1. Two keys map to the same index
  2. Two keys are inserted into the table
  3. The table exceeds its capacity
  4. The table becomes empty

Answer: a) Two keys map to the same index

Q10. Which data structure is used in depth-first search (DFS)?

  1. Queue
  2. Stack
  3. Array
  4. Linked List

Answer: b) Stack

Q11. Which algorithm is used for graph traversal that visits all the nodes in a graph level by level?

  1. Depth-First Search (DFS)
  2. Dijkstra’s Algorithm
  3. Bellman-Ford Algorithm
  4. Breadth-First Search (BFS)

Answer: d) Breadth-First Search (BFS)

Q12. Which sorting algorithm has a worst-case time complexity of O(n^2)?

  1. Merge Sort
  2. Quick Sort
  3. Selection Sort
  4. Heap Sort

Answer: c) Selection Sort

All CS521 files →
CS521 Web Systems and Technologies All CS521 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.