State

private enum State

States of the step-by-step algorithm.

  • Is doing the heapifying before sifting down.

    Declaration

    Swift

    case heapifying
  • Is in the main while loop after heapify.

    Declaration

    Swift

    case mainWhileLoop
  • Is sifting down, either from heapify or from main while loop.

    Declaration

    Swift

    case siftingDown
  • Work is done.

    Declaration

    Swift

    case finished