Class 12 Computer Science Chapter 2 – Computational Thinking Algorithms MCQs | FBISE | Grade 12 Computer

Practice 50 exam-oriented MCQs based on the FBISE HSSC-II Computer Science assessment framework. The questions cover algorithm efficiency, clarity and correctness, time and space complexity, arrays, lists, stacks, queues, trees, tree traversal, binary search, and evaluation of computational solutions.

1. What is an algorithm?

A) A finite sequence of steps for solving a problem
B) A computer’s physical memory
C) A type of database
D) A programming language
2. Which property means an algorithm must eventually stop?

A) Ambiguity
B) Finiteness
C) Input
D) Parallelism
3. What does correctness of an algorithm mean?

A) It uses the shortest code possible
B) It produces the intended correct result for valid inputs
C) It always runs in constant time
D) It uses no memory
4. What does algorithm efficiency mainly describe?

A) The colour of a program
B) The number of programmers
C) The size of the monitor
D) The resources required as input size grows
5. Time complexity describes:

A) How the running time grows with input size
B) Only the clock speed of a processor
C) The amount of disk space used by a program
D) The number of lines in a program
6. Space complexity describes:

A) The physical size of a computer
B) The number of users of a program
C) How memory requirements grow with input size
D) The speed of an internet connection
7. Big-O notation is commonly used to describe:

A) The exact execution time on one computer
B) An upper-bound growth rate of resource usage
C) The programming language used
D) The number of variables in source code
8. Which complexity generally grows more slowly as input size increases?

A) O(n²)
B) O(2^n)
C) O(n!)
D) O(n)
9. What is the time complexity of accessing an element by index in a typical array?

A) O(1)
B) O(n)
C) O(log n)
D) O(n²)
10. A linear search through n unsorted elements has worst-case time complexity:

A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
11. Binary search on a sorted array has worst-case time complexity:

A) O(n)
B) O(log n)
C) O(n²)
D) O(2^n)
12. Binary search requires the data to be:

A) Encrypted
B) Randomly ordered
C) Stored in a tree only
D) Sorted
13. In binary search, the search interval is repeatedly:

A) Divided into two parts
B) Doubled
C) Reversed completely
D) Converted into a linked list
14. For a sorted list of 16 elements, binary search needs at most approximately how many comparisons to reduce the search interval to one element?

A) 2
B) 3
C) 4
D) 16
15. What is a trade-off between time and space?

A) Using more memory can sometimes reduce execution time
B) Using more time always reduces memory to zero
C) Time and space can never affect each other
D) Using less memory always makes an algorithm faster
16. What does clarity of an algorithm refer to?

A) How expensive the computer is
B) How many users run it
C) How much electricity the computer uses
D) How easily the steps can be understood and followed
17. Which feature improves algorithm clarity?

A) Meaningful names and logically organized steps
B) Unexplained abbreviations everywhere
C) Unnecessary repeated steps
D) Mixing unrelated operations
18. Why is pseudocode useful?

A) It is always executable code
B) It replaces all testing
C) It expresses algorithmic logic without depending on a specific programming language
D) It automatically improves hardware performance
19. A correct algorithm should give correct results for:

A) Only the example used by the programmer
B) All valid inputs within its specified problem domain
C) Only the smallest input
D) Only inputs chosen after seeing the output
20. One way to help prove an algorithm correct is to:

A) Change the expected result
B) Avoid considering inputs
C) Use only one random test
D) Show that its steps preserve the required conditions and produce the desired result
21. What is a data structure?

A) A way of organizing and storing data for efficient use
B) A type of operating system
C) A network cable
D) A computer display
22. An array is generally:

A) A collection in which elements cannot be accessed
B) A tree with no root
C) A collection of elements stored in an indexed structure
D) A queue with unlimited priority
23. A list is useful for:

A) Representing only hierarchical data
B) Storing an ordered collection of elements
C) Storing only numbers
D) Replacing all algorithms
24. A stack follows which principle?

A) First In First Out
B) Random In Random Out
C) Highest Value First
D) Last In First Out
25. A queue follows which principle?

A) First In First Out
B) Last In First Out
C) Largest First
D) Smallest First
26. Which operation adds an item to the top of a stack?

A) Dequeue
B) Peek
C) Push
D) Pop
27. Which operation removes the top item from a stack?

A) Push
B) Pop
C) Enqueue
D) Search
28. Which operation adds an item to a queue?

A) Pop
B) Push
C) Peek
D) Enqueue
29. Which operation removes an item from the front of a queue?

A) Dequeue
B) Enqueue
C) Push
D) Insert
30. A tree data structure is best described as:

A) A circular sequence of unrelated elements
B) A linear structure with one end only
C) A hierarchical structure made of nodes and edges
D) A table containing only numbers
31. The top node of a tree is called the:

A) Leaf
B) Root
C) Child
D) Sibling
32. A node with no children is called a:

A) Root
B) Parent
C) Branch
D) Leaf
33. A node directly connected below another node is its:

A) Child
B) Root
C) Sibling
D) Ancestor only
34. Two nodes with the same parent are called:

A) Leaves
B) Ancestors
C) Siblings
D) Roots
35. In a binary tree, each node can have at most:

A) One child
B) Two children
C) Three children
D) Four children
36. A binary search tree has the property that values in the left subtree are generally:

A) Always equal to the root
B) Unrelated to the root
C) Greater than the root
D) Less than the root
37. In-order traversal of a binary tree visits nodes in which order?

A) Left, Root, Right
B) Root, Left, Right
C) Left, Right, Root
D) Right, Root, Left
38. Pre-order traversal visits nodes in which order?

A) Left, Right, Root
B) Right, Root, Left
C) Root, Left, Right
D) Root, Right, Left
39. Post-order traversal visits nodes in which order?

A) Root, Left, Right
B) Left, Right, Root
C) Left, Root, Right
D) Right, Root, Left
40. For a binary search tree, in-order traversal produces values in:

A) Random order
B) Reverse insertion order
C) Level order
D) Sorted order
41. Consider a tree with root 8, left child 4, and right child 12. Its in-order traversal is:

A) 4, 8, 12
B) 8, 4, 12
C) 12, 8, 4
D) 4, 12, 8
42. For the same tree, its pre-order traversal is:

A) 4, 8, 12
B) 12, 8, 4
C) 8, 4, 12
D) 4, 12, 8
43. For the same tree, its post-order traversal is:

A) 8, 4, 12
B) 4, 12, 8
C) 12, 4, 8
D) 4, 8, 12
44. Which data structure is naturally suited to representing hierarchical relationships?

A) Queue
B) Stack
C) Array only
D) Tree
45. What is the main advantage of binary search over linear search on a suitable sorted collection?

A) It can reduce the search space by half at each step
B) It always examines every element
C) It requires unsorted data
D) It uses no comparisons
46. If the target value is smaller than the middle value during binary search, the next search is made in the:

A) Entire original list
B) Right half
C) Left half
D) Unrelated list
47. If the target value is larger than the middle value during binary search, the next search is made in the:

A) Left half
B) Right half
C) Entire original list
D) Previous midpoint only
48. Why does binary search become inefficient or invalid on an unsorted list?

A) It requires a tree
B) It cannot compare values
C) It always uses too much memory
D) The decision about which half to discard depends on sorted order
49. Which algorithmic property is concerned with whether the steps are understandable and unambiguous?

A) Clarity
B) Space complexity
C) Input size
D) Storage capacity
50. Which measure can be used to compare algorithm efficiency independently of a particular machine?

A) Monitor resolution
B) Keyboard speed
C) Asymptotic complexity
D) Screen brightness


Syllabus & SLO Alignment

This chapter is prepared with reference to the FBISE HSSC-II Computer Science Assessment Framework and the National Curriculum of Pakistan. It covers SLO CS-12-B-01 on evaluating computational solutions in terms of efficiency, clarity, and correctness, and SLO CS-12-B-02 on applying complex algorithms to data structures such as trees and binary search.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top