Interface SortingAlgorithm

All Known Implementing Classes:
BidirectionalBubble, BinaryInsertion, Bubble, BubbleSentinel, DirectInsertion, DirectSelection, Heapsort, Mergesort, Quicksort, Radix, Shellsort

public interface SortingAlgorithm

Sorting Algorithm Contract

Defines the standard API for all sorting algorithms in the repository. Provides options for standard execution or step-by-step traceable execution for educational visualization.

Author:
vicegd
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    sort(int[] elements)
    Sorts the elements in-place silently.
    void
    sort(int[] elements, boolean trace)
    Sorts the elements in-place, optionally emitting step-by-step traces to visualize the algorithmic progression.
  • Method Details

    • sort

      void sort(int[] elements)
      Sorts the elements in-place silently.
      Parameters:
      elements - The array of integers to be sorted.
    • sort

      void sort(int[] elements, boolean trace)
      Sorts the elements in-place, optionally emitting step-by-step traces to visualize the algorithmic progression.
      Parameters:
      elements - The array of integers to be sorted.
      trace - If true, logs the internal state during execution.