solution - Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm repeatedly compares adjacent elements and swaps them if they are in the wrong order?

Solution :
686120260621045700 Correct Answer : Bubble Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm builds the sorted array one element at a time?

Solution :
349820260621045624 Correct Answer : Insertion Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Selection Sort works by:

Solution :
642720260621045537 Correct Answer : Selecting the smallest element and placing it at the beginning

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm follows the Divide and Conquer approach?

Solution :
276220260621045505 Correct Answer : Merge Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm selects a pivot element?

Solution :
8320260621045433 Correct Answer : Quick Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm uses a Binary Heap?

Solution :
714220260621045352 Correct Answer : Heap Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm is NOT comparison-based?

Solution :
59820260621045311 Correct Answer : Counting Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Radix Sort sorts numbers by:

Solution :
472020260621045222 Correct Answer : Digits

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Bucket Sort is most efficient when:

Solution :
433220260621045143 Correct Answer : Data is uniformly distributed

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Shell Sort is an improvement over:

Solution :
55820260621045057 Correct Answer : Insertion Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Best-case time complexity of Bubble Sort (optimized)?

Solution :
680120260621045016 Correct Answer : O(n)

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Average time complexity of Quick Sort?

Solution :
691520260621044924 Correct Answer : O(n log n)

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Worst-case complexity of Quick Sort?

Solution :
541020260621044824 Correct Answer : O(n²)

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Merge Sort requires:

Solution :
237520260621044747 Correct Answer : O(n) extra memory

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm is stable?

Solution :
371820260621044710 Correct Answer : Merge Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Heap Sort worst-case complexity?

Solution :
669320260621044615 Correct Answer : O(n log n)

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Counting Sort works best when:

Solution :
986820260621044534 Correct Answer : Small integer range

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Radix Sort complexity is:

Solution :
403920260621044440 Correct Answer : O(d(n+k))

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sort has the least number of swaps?

Solution :
853320260621044350 Correct Answer : Selection Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Shell Sort performance depends on:

Solution :
956520260621044320 Correct Answer : Gap sequence

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm guarantees O(n log n) in the worst case?

Solution :
254720260621044231 Correct Answer : Merge Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which algorithm is in-place but NOT stable?

Solution :
667920260621044143 Correct Answer : Heap Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which algorithm performs best for nearly sorted data?

Solution :
886220260621044102 Correct Answer : Insertion Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Counting Sort cannot directly sort:

Solution :
798820260621044023 Correct Answer : Floating-point numbers

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Average complexity of Bucket Sort is:

Solution :
688620260621043927 Correct Answer : O(n+k)

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which algorithm generally has the best cache performance?

Solution :
815720260621043843 Correct Answer : Quick Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which sorting algorithm is recursive by nature?

Solution :
629020260621043802 Correct Answer : Quick Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which algorithm is unsuitable for linked lists?

Solution :
662020260621043720 Correct Answer : Quick Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which algorithm is preferred for external sorting of huge files?

Solution :
442120260621043632 Correct Answer : Merge Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)

Question : Which algorithm has the best average-case performance among comparison-based sorts?

Solution :
338720260621043550 Correct Answer : Quick Sort

Description -

Data Structures and Algorithms : Sorting (Test 1)