@Override
  public List<T> sort(List<T> list) {
    // Iterate over the list, starting from the first element going to the last element.
    for (int outer = 1; outer < list.size(); outer++) {
      // In each iteration, perform another iteration from the very beginning of the list
      // to the point at which the outer loop has placed an element in its final position.
      // At each step, compare whether the element to the right is out of place with the current
      // element and if so, swap.
      for (int left = 0; left < (list.size() - outer); left++) {
        int right = left + 1;
        if (list.get(left).compareTo(list.get(right)) > 0) {
          listSorterHelper.swap(list, left, right);
        }
      }
    }
    return list;
  }