MCQs / Computer Science / Unit 2: Computational Thinking and Algorithms
Unit 2: Computational Thinking and Algorithms MCQs — Computer Science 43 multiple-choice questions on Unit 2: Computational Thinking and Algorithms from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.
1. Binary search can be used only when the list is: Made of strings only Smaller than 10 items Unsorted Sorted Answer: D) Sorted
Explanation: Binary search compares with the middle element to discard half the list — this needs sorted data. SLO CS-11-B-02 · Knowledge
Discuss this question
2. In a flowchart, which symbol represents a decision? Oval Diamond Parallelogram Rectangle Answer: B) Diamond
Explanation: Diamond = decision, rectangle = process, parallelogram = input/output, oval = start/stop. SLO CS-11-B-01 · Knowledge
Discuss this question
3. Pseudocode is: An informal, language-independent description of an algorithm's steps A type of flowchart symbol A program that runs only in Python Machine code for the CPU Answer: A) An informal, language-independent description of an algorithm's steps
Explanation: Pseudocode uses structured English-like statements so the logic can be understood before coding. SLO CS-11-B-01 · Knowledge
Discuss this question
4. Running an algorithm by hand with sample values to check each step is called: Encrypting Dry run (tracing) Deploying Compiling Answer: B) Dry run (tracing)
Explanation: A dry run tracks variable values in a trace table to find logic errors. SLO CS-11-B-01 · Knowledge
Discuss this question
5. Bubble sort is applied to [5, 1, 4, 2] in ascending order. What is the list after the first pass? [1, 4, 2, 5] [1, 5, 4, 2] [5, 4, 2, 1] [1, 2, 4, 5] Answer: A) [1, 4, 2, 5]
Explanation: Compare neighbours and swap if needed: (5,1)→swap, (5,4)→swap, (5,2)→swap. The largest value bubbles to the end. SLO CS-11-B-02 · Application
Discuss this question
6. Breaking a big problem into smaller, manageable parts is called: Encryption Abstraction Iteration Decomposition Answer: D) Decomposition
Explanation: Decomposition splits a problem into sub-problems. SLO CS-11-B-02 · Knowledge
Discuss this question
7. For a small, unsorted list, the most appropriate search is: Insertion search on a tree Bubble sort Binary search Linear search Answer: D) Linear search
Explanation: Linear search works on any list; sorting first just to search once is wasteful. SLO CS-11-B-02 · Understanding
Discuss this question
8. Trace this pseudocode with N = 10. What is printed? pseudo sum ← 0 i ← 2 WHILE i ≤ N sum ← sum + i i ← i + 2 END WHILE PRINT sum 25 55 30 20 Answer: C) 30
Explanation: It adds the even numbers 2 + 4 + 6 + 8 + 10 = 30. SLO CS-11-B-01 · Application
Discuss this question
9. Which criterion is used to evaluate an algorithm's efficiency? How much time and memory it needs as the input grows The colour of the flowchart The programming language chosen How many comments it has Answer: A) How much time and memory it needs as the input grows
Explanation: Efficiency compares running time and memory; correctness and clarity are other criteria. SLO CS-11-B-01 · Understanding
Discuss this question
10. How many passes does bubble sort need, at most, to sort a list of n items? log2 n n - 1 n 2n Answer: B) n - 1
Explanation: After each pass one more item is in its final place; after n-1 passes all are sorted. SLO CS-11-B-02 · Understanding
Discuss this question
11. Noticing that several problems are solved by the same steps is an example of: Pattern recognition Debugging Decomposition Abstraction Answer: A) Pattern recognition
Explanation: Pattern recognition finds similarities so one solution can be reused. SLO CS-11-B-02 · Understanding
Discuss this question
12. Which computational thinking skill removes unnecessary details to focus on what is essential? Pattern recognition Decomposition Algorithm design Abstraction Answer: D) Abstraction
Explanation: Abstraction hides detail (a map shows roads, not every tree). SLO CS-11-B-02 · Knowledge
Discuss this question
13. Which is the most efficient way to find an item in a sorted list of 1,000 items? Repeatedly halve the list and check the middle item Print all numbers from 1 to 1000 Shuffle the list and check randomly Check every item one by one from the start Answer: A) Repeatedly halve the list and check the middle item
Explanation: Halving the search space (binary search) needs at most about 10 comparisons for 1,000 items. SLO CS-11-B-01 · Application
Discuss this question
14. Which flowchart symbol is used for input or output? Diamond Circle Rectangle Parallelogram Answer: D) Parallelogram
Explanation: Parallelograms show reading input or displaying output. SLO CS-11-B-01 · Knowledge
Discuss this question
15. What is the maximum number of comparisons binary search needs to find an item in a sorted list of 1,000 items? 100 1000 500 10 Answer: D) 10
Explanation: Each step halves the list: 2^10 = 1024 ge 1000, so at most 10 comparisons. SLO CS-11-B-02 · Application
Discuss this question
16. Insertion sort works by: Choosing items at random Splitting the list in halves recursively Taking each item and inserting it into its correct place among the already-sorted items Repeatedly swapping neighbouring items through the whole list Answer: C) Taking each item and inserting it into its correct place among the already-sorted items
Explanation: Like sorting playing cards in your hand one at a time. SLO CS-11-B-02 · Understanding
Discuss this question
17. Removing unnecessary details and focusing on what matters is: decomposition abstraction sorting iteration Answer: B) abstraction
Explanation: Abstraction hides irrelevant details (e.g. a metro map). SLO CS-11-B-02
Discuss this question
18. Breaking a big problem into smaller parts is called: abstraction debugging decomposition pattern recognition Answer: C) decomposition
Explanation: Decomposition splits a problem into manageable sub-problems. SLO CS-11-B-02
Discuss this question
19. A table that records variable values step by step to check an algorithm is a: K-map frequency table truth table trace table Answer: D) trace table
Explanation: A trace table is used for dry runs. SLO CS-11-B-01
Discuss this question
20. Bubble sort can stop early when: the first item is the smallest it has done n passes a complete pass makes no swaps the list has an even length Answer: C) a complete pass makes no swaps
Explanation: No swaps in a pass means every adjacent pair is in order. SLO CS-11-B-02
Discuss this question
21. "Does the algorithm give the right result for all valid inputs and stop?" checks its: abstraction clarity efficiency correctness Answer: D) correctness
Explanation: Correctness means right output for all valid inputs in finite time. SLO CS-11-B-01
Discuss this question
22. To change "sum of numbers" into "product of numbers", the starting value must change from 0 to: 1 N −1 2 Answer: A) 1
Explanation: Multiplying by 0 would always give 0, so a product starts at 1. SLO CS-11-B-01
Discuss this question
23. A structured, English-like description of an algorithm that is not tied to any language is: pseudocode machine code source code a compiler Answer: A) pseudocode
Explanation: Pseudocode is language-independent and easy to translate into code. SLO CS-11-B-01
Discuss this question
24. Maximum comparisons needed by binary search on 1 024 sorted items is about: 512 11 1024 100 Answer: B) 11
Explanation: ⌊log₂ 1024⌋ + 1 = 10 + 1 = 11. SLO CS-11-B-02
Discuss this question
25. Which flowchart symbol represents input or output? Rectangle Diamond Circle Parallelogram Answer: D) Parallelogram
Explanation: Parallelograms are used for INPUT and OUTPUT. SLO CS-11-B-01
Discuss this question
Page 1 of 2 Next
Practise Unit 2: Computational Thinking and Algorithms MCQs
More Computer Science chapters