SortingAlgorithmLabel

public struct SortingAlgorithmLabel : Codable, Equatable, Hashable, Identifiable

The type used to uniquely identify a sorting algorithm implementation.

  • id

    The stable identity of the sorting algorithm label.

    Declaration

    Swift

    public let id: String
  • The name of the associated sorting algorithm.

    Suitable for display in UI.

    All names from the library are supplied in English.

    Declaration

    Swift

    public let name: String

Public Initialization

  • Creates a new label for a sorting algorithm.

    Declaration

    Swift

    public init(id: String, name: String)

    Parameters

    name

    The name of the sorting algorithm.

Collections

  • The labels of all sorting algorithms that are built into the library.

    Declaration

    Swift

    public static let allBuiltIn: [SortingAlgorithmLabel]

Individual Sorts

  • The label of the InsertionSort algorithm.

    Declaration

    Swift

    public static let insertion: SortingAlgorithmLabel
  • The label of the MergeSort algorithm.

    Declaration

    Swift

    public static let merge: SortingAlgorithmLabel