Valid Foundations-of-Computer-Science Dumps shared by EduDump.com for Helping Passing Foundations-of-Computer-Science Exam! EduDump.com now offer the newest Foundations-of-Computer-Science exam dumps, the EduDump.com Foundations-of-Computer-Science exam questions have been updated and answers have been corrected get the newest EduDump.com Foundations-of-Computer-Science dumps with Test Engine here:
What is the first step in the selection sort algorithm?
Correct Answer: C
Selection sort works by growing a sorted portion of the list one element at a time. The algorithm conceptually divides the array into two regions: asorted prefixon the left and anunsorted suffixon the right. At the beginning, the sorted prefix is empty and the entire list is unsorted. The first step is to consider position 0 as the target location for the smallest element. The algorithm scans the unsorted region (initially the whole list) to find the smallest valueand records its index. That action is exactly what option C describes: determine the lowest value starting from the first position. After identifying the minimum element, selection sort swaps it into position 0 (if it isn't already there). Then it repeats the process for position 1, scanning the remaining unsorted suffix to find the next smallest element, swapping it into place, and so on. Textbooks emphasize that the key characteristic of selection sort is the repeated "select min (or max) from unsorted region and place it into the sorted region." Option A is not the standard first step; finding both min and max is unnecessary. Option B describes an unrelated swap that doesn't ensure progress toward sorting. Option D is not a "first step" but rather a different ordering goal; selection sort can be adapted for descending order, but the canonical version begins by selecting the minimum for the first position.