Computer Science Federal Board Class-11
Chapter
Computational Thinking
01 & Algorithm
MULTIPLE CHOICE QUESTIONS
1. Which of the following is NOT a part of computational thinking?
a. Abstraction b. Pattern recognition
c. Trial and error d. Decomposition
2. What does 'abstraction' mean in computational thinking?
a. Break a problem into smaller parts b. Ignoring unnecessary details
c. Following step-by-step instructions d. Identifying patterns in data
3. Decomposition in computational thinking involves:
a. Writing code b. Testing and debugging
c. Breaking a problem into smaller, manageable parts
d. Making abstract decisions
4. Pattern recognition helps in:
a. Ignoring unnecessary details
b. Recognizing recurring problems and solutions
c. Debugging code d. Randomizing the output
5. Which is an example of abstraction?
a. Writing the full code for sorting a list
b. Ignoring the brand of a computer while solving a software problem
c. Breaking down a system into modules
d. Identifying similarities in data sets
6. An algorithm is:
a. A specific programming language
b. A sequence of steps to solve a problem
c. A type of computer
d. A debugging method
7. Which of the following characteristics should an algorithm have?
1|Page
Computer Science Federal Board Class-11
a. Ambiguity b. Infinite steps
c. Clarity and finiteness d. Randomness
8. What does a flowchart represent?
a. The syntax of a programming language
b. The memory structure of a computer
c. The logical steps in an algorithm d. The hardware layout of a computer
9. What is pseudocode?
a. A way of writing algorithms in plain language
b. Code that doesn't run on computers
c. A programming language d. An encrypted program
10. If an algorithm has a time complexity of O(n²), it means:
a. The algorithm runs faster as input grows
b. The time taken is constant regardless of input
c. The time increases linearly with input
d. The time increases quadratically with input
11. Which data structure uses LIFO (Last In, First Out) principle?
a. Queue b. Stack
c. Array d. Linked List
12. Which of the following is a linear data structure?
a. Tree b. Graph
c. Stack d. Hash Table
13. What is the worst-case time complexity for searching an element in an
unsorted array?
a. O(1) b. O(log n)
c. O(n) d. O(n²)
14. In which data structure does each element point to the next element forming
a chain?
a. Array b. Hash Table
c. Linked List d. Stack
2|Page
Computer Science Federal Board Class-11
15. A queue follows which of the following principles?
a. LIFO b. FIFO
c. FILO d. None
16. Which data structure is best suited for implementing recursion?
a. Queue b. Array
c. Stack d. Linked List
17. What is the maximum number of children a binary tree node can have?
a. 1 b. 2
c. 3 d. Unlimited
18. Which of the following data structures is non-linear?
a. Queue b. Stack
c. Tree d. Array
19. What is the time complexity to access an element in an array by index?
a. O (1) b. O (n)
c. O (log n) d. O (n²)
20. A hash table stores data in:
a. A tree structure b. A sorted list
c. Key-value pairs d. A linear sequence
21. What is the time complexity to insert an element at the end of an array (with
unused space)?
a. O (1) b. O(n)
c. O (log n) d. O(n log n)
22. What is the main limitation of arrays?
a. Random access is not possible b. Fixed size
c. Can’t store elements of same type d. Elements are unordered
23. Which of the following allows constant-time access to any element?
a. Stack b. Queue
c. Array d. Linked List
3|Page
Computer Science Federal Board Class-11
24. Which of the following operations is not possible in a stack?
a. Insert at the top b. Remove from the top
c. Search an element from the bottom d. Insert at the bottom
25. Which data structure is used to implement function calls (call stack)?
a. Queue b. Array
c. Stack d. Tree
26. What will be the postfix expression of (A + B) \ C?
a. AB + C \ b. AB C + \
c. AB + C\ d. A + BC\
27. A circular queue overcomes which limitation of a simple queue?
a. Size limit b. FIFO behavior
c. Wastage of space d. Insertion at rear
28. Which operation is not performed on the front of a queue?
a. Enqueue b. Dequeue
c. Peek d. None of the above
29. What is the time complexity of enqueue and dequeue in a queue?
a. O (1) b. O (n)
c. O (log n) d. O (n²)
30. A graph with no cycles is called:
a. Directed Graph b. Cyclic Graph
c. Acyclic Graph d. Complete Graph
31. What is the space complexity of an adjacency matrix for a graph with 'n'
vertices?
a. O(n) b. O(n²)
c. O(log n) d. O(n + e)
32. Which graph traversal algorithm uses a queue?
a. DFS b. BFS
c. Dijkstra d. Kruskal
4|Page
Computer Science Federal Board Class-11
33. What is the maximum number of nodes in a binary tree of height h?
a. h b. 2^h - 1
c. h^2 d. h \ 2
34. Which traversal visits nodes in Left-Root-Right order?
a. Preorder b. Inorder
c. Postorder d. Level-order
35. Which tree has elements arranged such that each parent is less than or equal
to its children?
a. Binary Search Tree b. Max Heap
c. Min Heap d. AVL Tree
36. Which of the following is the first step in evaluating a computational solution?
a. Measuring execution time b. Checking for syntax errors
c. Verifying correctness d. Optimizing performance
37. What does “efficiency” typically refer to in evaluating algorithms?
a. How readable the code is
b. How fast and how much memory it uses
c. The number of comments in the code
d. The popularity of the programming language used
38. What is the time complexity of a well-optimized binary search algorithm?
a. O(n) b. O(log n)
c. O(n log n) d. O(1)
39. Which of the following is an example of space complexity concern?
a. The number of loops in a program b. The file size of source code
c. The amount of memory an algorithm uses
d. The time it takes to run a program
40. Which quality ensures that a computational solution continues to work as
problem size increases?
a. Security b. Maintainability
c. Scalability d. Flexibility
5|Page
Computer Science Federal Board Class-11
41. Why is maintainability important in software solutions?
a. To make the solution run faster b. To reduce storage usage
c. To increase the number of features
d. To ensure others can understand, modify, and update it easily
42. A solution that produces correct results but takes too long to compute for
large inputs is considered:
a. Correct and efficient b. Scalable
c. Inefficient d. Reliable
43. What is usability in the context of evaluating a computational solution?
a. How fast the code runs b. How easy the interface is for users
c. How much memory the system uses
d. How often the code crashes
44. Which tool is commonly used to measure algorithm performance in real time?
a. Stopwatch b. Profiler
c. Compiler d. Debugger
45. A program that works well on one device but fails on others lacks:
a. Portability b. Efficiency
c. Modularity d. Abstraction
46. A program is said to be correct if:
a. It runs without errors b. It follows coding standards
c. It produces the expected output for all valid inputs
d. It compiles successfully
47. Which of the following best ensures program correctness?
a. Code indentation b. Code reuse
c. Thorough testing d. Using latest libraries
48. A logic error in a program affects:
a. Syntax b. Compilation
c. Output correctness d. Hardware execution
6|Page
Computer Science Federal Board Class-11
49. Which factor contributes most to code clarity?
a. Short variable names b. Single-letter function names
c. Proper indentation and meaningful comments
d. Removing all white spaces
50. Why is clarity important in programming?
a. To increase program speed b. To avoid the need for comments
c. To reduce the number of lines of code
d. To allow others (and yourself) to understand and maintain the code
51. A self-documenting variable name would be:
a. x1 b. n
c. totalMarks d. a
52. What determines an algorithm’s efficiency?
a. Number of comments b. Size of the source file
c. Number of developers working on it d. Memory usage and execution time
53. Which algorithm is the most efficient for searching a sorted list?
a. Binary search b. Linear search
c. Bubble sort d. Selection sort
54. Which complexity class represents the fastest-growing time complexity?
a. O(log n) b. O(n)
c. O(n log n) d. O(2^n)
55. If a ride-sharing app uses too much battery and crashes often, what evaluation
criteria does it fail?
a. Correctness only b. Efficiency and reliability
c. Clarity d. Scalability
56. In a case study, a student’s program gave correct results but was 5 times
slower than peers’. What should they improve?
a. Correctness b. Efficiency
c. Clarity d. Input methods
7|Page
Computer Science Federal Board Class-11
57. A hospital management system is easy to navigate and has minimal training
time. This shows good:
a. Usability b. Scalability
c. Algorithm design d. Security
58. A case study shows a developer used clear naming conventions and
comments. This is an example of:
a. Correctness b. Efficiency
c. Clarity d. Optimization
59. Which of these issues can best be found using test cases?
a. Efficiency bottlenecks b. Clarity problems
c. Incorrect logic/output d. Poor code formatting
60. A program is said to be correct if:
a. It runs without errors b. It follows coding standards
c. It produces the expected output for all valid inputs
d. It compiles successfully
61. Which of the following best ensures program correctness?
a. Code indentation b. Code reuse
c. Thorough testing d. Using latest libraries
62. A logic error in a program affects:
a. Syntax b. Compilation
c. Output correctness d. Hardware execution
63. Which factor contributes most to code clarity?
a. Short variable names b. Single-letter function names
c. Proper indentation and meaningful comments
d. Removing all white spaces
64. Why is clarity important in programming?
a. To increase program speed b. To avoid the need for comments
c. To allow others (and yourself) to understand and maintain the code
8|Page
Computer Science Federal Board Class-11
d. To reduce the number of lines of code
65. A self-documenting variable name would be:
a. x1 b. n
c. totalMarks d. a
66. What determines an algorithm’s efficiency?
a. Number of comments b. Memory usage and execution time
c. Size of the source file d. Number of developers working
67. Which algorithm is the most efficient for searching a sorted list?
a. Linear search b. Binary search
c. Bubble sort d. Selection sort
68. Which complexity class represents the fastest-growing time complexity?
a. O(log n) b. O(n)
c. O(n log n) d. O(2^n)
69. If a ride-sharing app uses too much battery and crashes often, what evaluation
criteria does it fail?
a. Correctness only b. Efficiency and reliability
c. Clarity d. Scalability
70. In a case study, a student’s program gave correct results but was 5 times
slower than peers’. What should they improve?
a. Correctness b. Efficiency
c. Clarity d. Input methods
71. A hospital management system is easy to navigate and has minimal training
time. This shows good:
a. Usability b. Scalability
c. Algorithm design d. Security
72. A case study shows a developer used clear naming conventions and
comments. This is an example of:
a. Correctness b. Efficiency
c. Clarity d. Optimization
9|Page
Computer Science Federal Board Class-11
73. Which of these issues can best be found using test cases?
a. Efficiency bottlenecks b. Clarity problems
c. Incorrect logic/output d. Poor code formatting
10 | P a g e