Class BidirectionalBubble

java.lang.Object
topics.sorting.others.BidirectionalBubble
All Implemented Interfaces:
ISortingAlgorithm

public class BidirectionalBubble extends Object implements ISortingAlgorithm
Sorting algorithm: Bidirectional Bubble method
Author:
vicegd
  • Constructor Details

    • BidirectionalBubble

      public BidirectionalBubble()
  • 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