What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order?
Difficulty: Easy
About this MCQ
This Easy Algorithms MCQ checks one syllabus fact.
The question is: “What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order?”
The accepted answer is C. Bubble sort. Bubble sort is the fact required by “What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order” (option C). Option A (“Backtracking”) does not match the stem; it is a near-miss used to catch incomplete recall of Bubble sort. Option B (“Time complexity”) does not match the stem; it is a near-miss used to catch incomplete recall of Bubble sort. Remaining alternatives (Greedy algorithm) fall outside the same rule and should be eliminated once Bubble sort is identified. Algorithms questions of this type reward precise definitions rather than approximate associations. Algorithms recall of this distinction is a regular item in FPSC, PPSC, NTS, and CSS papers.
- A. Backtracking
Why not A: “Backtracking” is not correct. The accepted answer is C. Bubble sort. Bubble sort is the fact required by “What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order” (option C). Option A (“
- B. Time complexity
Why not B: “Time complexity” is not correct. The accepted answer is C. Bubble sort. Bubble sort is the fact required by “What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order” (option C). Option A (“
- C. Bubble sort ✓
- D. Greedy algorithm
Why not D: “Greedy algorithm” is not correct. The accepted answer is C. Bubble sort. Bubble sort is the fact required by “What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order” (option C). Option A (“
Correct answer
C. Bubble sort
Explanation
Bubble sort is the fact required by “What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order” (option C). Option A (“Backtracking”) does not match the stem; it is a near-miss used to catch incomplete recall of Bubble sort. Option B (“Time complexity”) does not match the stem; it is a near-miss used to catch incomplete recall of Bubble sort. Remaining alternatives (Greedy algorithm) fall outside the same rule and should be eliminated once Bubble sort is identified. Algorithms questions of this type reward precise definitions rather than approximate associations. Algorithms recall of this distinction is a regular item in FPSC, PPSC, NTS, and CSS papers.
Source: Algorithms Official Reference Guide
Tags: computer science, algorithms, problem solving, complexity analysis
Submitted by: MCQsHub Editorial
Related MCQs
- Which term refers to a search algorithm that repeatedly divides a sorted array in half to locate a target valu...
- Identify the correct concept described as: a divide-and-conquer sorting algorithm that splits the array, sorts...
- Merge sort is best defined as which of the following?
- A divide-and-conquer sorting algorithm that partitions elements around a pivot value. What is this concept cal...
- Choose the correct description of Quick sort.
- Which of the following best names the concept in which an algorithmic technique that solves problems by breaki...