Asked by Deepak Karira on May 29, 2024

verifed

Verified

Selection sort uses nested for loops.

Selection Sort

A simple, comparison-based sorting algorithm that divides the input list into a sorted and an unsorted region, repeatedly selecting the smallest or largest element from the unsorted region and moving it to the sorted region.

Nested Loops

A loop inside another loop, where the inner loop completes all its iterations for every single iteration of the outer loop.

For Loops

A control flow statement for specifying iteration, allowing code to be executed repeatedly based on a given condition.

  • Absorb the essence, approach, and capability of selection sort in categorizing data.
verifed

Verified Answer

GO
Gregory OlsonMay 31, 2024
Final Answer :
True
Explanation :
Selection sort uses nested for loops to iterate through the array and compare each element with the rest of the array to find the smallest element and swap it with the first element of the unsorted part of the array. This process repeats until the entire array is sorted.