@Override
  public List<T> sort(List<T> list) {
    // Initially, no elements are sorted.
    int sortedIndex = 0;

    // Keep sorting an element each iteration until the entire list is sorted.
    while (sortedIndex < list.size()) {
      // The left-most (or lowest) unsorted element is at the boundary of the sorted index.
      int smallestUnsortedIndex = sortedIndex;
      // Iterate from the first unsorted element (the boundary of the sorted index) all the way
      // to the end of the list, checking one element at a time for the smallest element
      // among the unsorted list. This element, will be swapped into its final sorted position.
      for (int nextIndexToCheck = sortedIndex;
          nextIndexToCheck < list.size();
          nextIndexToCheck++) {
        // Keep looking for the smallest unsorted element.
        if (list.get(smallestUnsortedIndex).
                compareTo(list.get(nextIndexToCheck)) > 0) {
          smallestUnsortedIndex = nextIndexToCheck;
        }
      }
      // Swap the smallest unsorted element into place and increment the boundary of the
      // sorted portion of the list by one.
      helper.swap(list, sortedIndex, smallestUnsortedIndex);
      sortedIndex++;
    }
    return list;
  }