Class DirectSelection

java.lang.Object
topics.sorting.DirectSelection
All Implemented Interfaces:
ISortingAlgorithm

public class DirectSelection extends Object implements ISortingAlgorithm
Sorting algorithm: Direct selection method
Author:
vicegd
  • Constructor Details

    • DirectSelection

      public DirectSelection()
  • Method Details

    • sort

      public void sort(int[] elements)
      Description copied from interface: ISortingAlgorithm
      Sorts elements without tracing anything
      Specified by:
      sort in interface ISortingAlgorithm
      Parameters:
      elements - Array of numbers to be sorted
    • sort

      public void sort(int[] elements, boolean trace)
      Description copied from interface: ISortingAlgorithm
      Sorts elements with the possibility of tracing the operation
      Specified by:
      sort in interface ISortingAlgorithm
      Parameters:
      elements - Array of numbers to be sorted
      trace - Whether to trace the operation performed