Skip to content
VUBuddy

CS505 Midterm Preparation by ZB

Virtual Systems and Services PDF 688 KBUpdated 23 Oct 2026
Midterm past paper CS505 Midterm Preparation by ZB PDF 688 KB
vubuddy.com
Type
Midterm past paper
Course
CS505 Virtual Systems and Services
Size
PDF 688 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 688 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 of the following is a correct definition of an algorithm? a) A sequence of steps to solve a problem

  1. A programming language
  2. A type of data structure
  3. A process that requires human intervention

Answer: A) A programming language A sequence of steps to solve a problem

Q2. Which of the following is NOT a characteristic of a good algorithm? a) Finiteness

  1. Definiteness
  2. Infinite loops
  3. Efficiency

Answer: C) Efficiency Infinite loops

Q3. Which of the following sorting algorithms has the best worst-case time complexity? a) Bubble sort

  1. Quick sort
  2. Merge sort
  3. Selection sort

Answer: C) Selection sort Merge sort

Q4. Which of the following is true about Big O notation? a) It measures the best-case time complexity.

  1. It measures the worst-case time complexity.
  2. It is used to determine memory usage.
  3. It does not consider input size.

Answer: B) It is used to determine memory usage. It measures the worst-case time complexity.

Q5. Which data structure uses LIFO (Last In, First Out) order? a) Queue

  1. Stack
  2. Linked list
  3. Tree

Answer: B) Linked list Stack

Q6. Which of the following is the correct order of complexity from best to worst? a) O(n), O(log n), O(n^2)

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

Answer: C) O(n), O(n^2), O(log n) O(log n), O(n), O(n^2)

Q7. Which of the following is the best-case time complexity for Quick Sort? a) O(n^2)

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

Answer: B) O(n) O(n log n)

Q8. Which of the following is the primary purpose of a hash function? a) To sort the data

  1. To map data to a fixed-size value
  2. To find the maximum value
  3. To divide the data into smaller segments

Answer: B) To find the maximum value To map data to a fixed-size value

Q9. What does BFS (Breadth-First Search) explore first in a graph? a) The deepest node

  1. The nodes closest to the starting point
  2. The most distant node
  3. All leaf nodes

Answer: B) The most distant node The nodes closest to the starting point

Q10. Which of the following is an example of a divide and conquer algorithm? a) Merge Sort

  1. Bubble Sort
  2. Selection Sort
  3. Linear Search

Answer: A) Bubble Sort Merge Sort

Q11. Which of the following operations is performed in constant time? a) Inserting an element into a linked list

  1. Searching for an element in an unsorted array
  2. Accessing an element by index in an array
  3. Inserting an element into a balanced tree

Answer: C) Inserting an element into a balanced tree Accessing an element by index in an array

Q12. Which of the following is a feature of a Binary Search Tree (BST)? a) Each node has two children with equal value

  1. Nodes are arranged in increasing order
  2. The left child is greater than the parent node
  3. The right child is smaller than the parent node

Answer: B) The left child is greater than the parent node Nodes are arranged in increasing order

All CS505 files →
CS505 Virtual Systems and Services All CS505 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.