Which of the following is the simplest searching algorithm?
A
Binary Search B
Linear Search C
Jump Search D
Interpolation Search
Analysis & Theory
Linear Search is the simplest: it checks each element one by one.
In Bubble Sort, what happens in each pass through the array?
A
The smallest element is moved to the front B
The largest element is moved to the end C
All elements are reversed D
Elements are randomly swapped
Analysis & Theory
Bubble Sort compares adjacent elements and moves the largest to the end each pass.
Which of the following properties must a correct algorithm always have?
A
Infinite steps B
Ambiguity C
Finiteness D
Recursion
Analysis & Theory
A correct algorithm must always terminate (finiteness) and be unambiguous.
What is the best case time complexity of Linear Search?
A
O(1) B
O(log n) C
O(n) D
O(n log n)
Analysis & Theory
Best case: the element is at the first position (O(1)).
Which of these algorithms repeatedly divides the search interval in half?
A
Linear Search B
Binary Search C
Bubble Sort D
Selection Sort
Analysis & Theory
Binary Search divides the interval in half each time.
Which sorting algorithm selects the smallest element and puts it in place each iteration?
A
Bubble Sort B
Insertion Sort C
Selection Sort D
Quick Sort
Analysis & Theory
Selection Sort picks the smallest remaining element for each position.
What is the main characteristic of a greedy algorithm?
A
Solves problems recursively B
Backtracks to try all solutions C
Always makes the locally optimal choice D
Sorts elements randomly
Analysis & Theory
A greedy algorithm picks the best option at each step.
What does the term 'time complexity' refer to?
A
Amount of memory used B
Number of steps an algorithm takes to complete C
Number of variables declared D
Quality of code
Analysis & Theory
Time complexity measures how the number of steps grows with input size.
What is the main idea of Divide and Conquer algorithms?
A
Combine all elements before processing B
Use a single loop for all steps C
Break the problem into smaller subproblems, solve, then combine D
Make random choices
Analysis & Theory
Divide and Conquer breaks problems into parts, solves them recursively, and merges results.
Which of the following is a simple algorithm for sorting?
A
Binary Search B
Bubble Sort C
Depth-First Search D
Breadth-First Search
Analysis & Theory
Bubble Sort is one of the simplest sorting algorithms.