A student must plan a solution that finds the largest value in a list before writing any code. Which computational thinking practice is the student primarily using?
Computational Thinking Problem Solving
Question · Easy
Contrapositive, darling: a torch song
Short
Breaking a complex program into smaller, independently solvable functions is an example of which computational thinking concept?
An algorithm runs a nested loop where both the outer and inner loops iterate n times. What is its Big-O time complexity?
Question · Medium
Which step of the software development life cycle focuses on determining what the system must do before any design or coding begins?
A teacher uses a flowchart to represent the steps of a decision-making process. Which symbol is conventionally used to represent a decision point?
Which problem-solving strategy involves repeatedly making the locally optimal choice at each step in hopes of finding a global optimum?
When a programmer ignores the internal details of a sorting function and only relies on its input and output behavior, the programmer is applying which concept?
Question · Hard
A program correctly compiles and runs but produces an incorrect average because it divides by the wrong count. What type of error is this?
Which technique helps a student systematically test an algorithm by manually tracing variable values through each step on paper?
An algorithm that always produces the correct result and terminates in a finite number of steps is said to have which property?
Which approach best evaluates the efficiency of two competing algorithms independent of the specific hardware they run on?
A student recognizes that calculating the area of many different rectangles follows the same length-times-width pattern and writes one reusable function. This is an example of which concept?
Which of the following best describes pseudocode?
When designing a solution, why is it important to consider edge cases (such as empty input or maximum values)?
A divide-and-conquer algorithm splits a problem in half at each step. Which time complexity is most characteristic of the splitting work in such algorithms (e.g., binary search)?
Which primitive data type is most appropriate for storing a value that can only be true or false?
Data Types And Structures
Which data structure follows a Last-In, First-Out (LIFO) order?
Which data structure processes elements in First-In, First-Out (FIFO) order?
What is the primary advantage of an array over a linked list for accessing elements?
A hash table provides which average-case time complexity for lookup, insertion, and deletion?
In a binary search tree (BST), where is a node with a value smaller than the current node placed?
How many distinct values can be represented by 8 bits?
What is the decimal value of the binary number 1011?
Which data type would best store the value 3.14159 in most programming languages?
Which encoding standard uses a unique code point for nearly every character in the world's writing systems, extending beyond the 128 characters of ASCII?
A two-dimensional array is most naturally suited to represent which of the following?
Which statement about a linked list is true compared to an array?
What is the hexadecimal representation of the decimal number 255?
Which abstract data type is best suited for implementing an undo feature that reverses the most recent action first?
A graph data structure consists of which two fundamental components?
Consider the loop: x = 0; while (x < 5) { x = x + 1 }. How many times does the loop body execute?
Programming Logic
According to De Morgan's laws, the expression NOT (A AND B) is logically equivalent to which of the following?
What is the result of the Boolean expression (true AND false) OR (NOT false)?
Which control structure executes a block of code only when a specified condition evaluates to true?
A recursive function must always include which component to prevent infinite recursion?
Which sorting algorithm repeatedly selects the smallest remaining element and places it in its sorted position, with a worst-case time complexity of O(n^2)?
Binary search can be applied to a list only if the list satisfies which precondition?
What does the modulo operator (%) compute?
A program throws a runtime exception when it tries to access array index 10 in an array of length 10. What is the cause?
Which loop construct is guaranteed to execute its body at least once, even if the condition is initially false?
In a truth table, the logical AND of two inputs is true under which condition?
What is the value of the expression 7 // 2 in a language where // denotes integer (floor) division?
Which type of loop is most appropriate when the exact number of iterations is known in advance?
A linear search examines each element until the target is found. What is its worst-case time complexity for a list of n elements?
Merge sort and quicksort both achieve which average-case time complexity?
What does the term 'short-circuit evaluation' mean in a Boolean expression such as (A AND B)?
Which statement best describes the purpose of internal program documentation (comments)?
Loading more…