Selection Sort

  1. Modify the selSort() function on P.478, and show the list before and after you swap nums[bottom] and nums[mp].
  2. Generate a list with 8 random integers and test your new selSort() with the list.
  3. The output may look like the following:
    
    54      5       29      73      18      86      32      9
    5       54      29      73      18      86      32      9
    
    5       54      29      73      18      86      32      9
    5       9       29      73      18      86      32      54
    
    5       9       29      73      18      86      32      54
    5       9       18      73      29      86      32      54
    
    5       9       18      73      29      86      32      54
    5       9       18      29      73      86      32      54
    
    5       9       18      29      73      86      32      54
    5       9       18      29      32      86      73      54
    
    5       9       18      29      32      86      73      54
    5       9       18      29      32      54      73      86
    
    5       9       18      29      32      54      73      86
    5       9       18      29      32      54      73      86