-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift Tips #51
Comments
private enum RBTreeColor { 枚举 |
public class RBTreeNode<T: Comparable>: Equatable { } |
public convenience init(key: T?) { public init(key: T?, leftChild: RBNode?, rightChild: RBNode?, parent: RBNode?) { } |
var isLeaf: Bool { |
var isLeaf: Bool { |
fileprivate(set) var root: RBNode |
extension RBTreeNode { |
if let leftChild = leftChild, !leftChild.isNullLeaf { |
// If node nil -> key not found guard let inputKey = input.key, let nodeKey = node.key else { |
// MARK: - Inserting new nodes |
extension RBTreeNode: CustomStringConvertible { |
extension TreeNode where T: Equatable { } |
private func insert(_ key: KeyType, val: Any) { } |
private var cache: [KeyType: Any] = [:] |
public mutating func sort() -> [T] {} |
private var orderCriteria: (T, T) -> Bool /**
|
@inline(__always) internal func parentIndex(ofIndex i: Int) -> Int { |
public mutating func insert<S: Sequence>(_ sequence: S) where S.Iterator.Element == T { |
@discardableResult public mutating func remove() -> T? { } |
var h1 = Heap(array: [5, 13, 2, 25, 7, 17, 20, 8, 4], sort: >) |
func partitionDutchFlag<T: Comparable>(_ a: inout [T], low: Int, high: Int, pivotIndex: Int) -> (Int, Int) { |
public typealias RBNode = RBTreeNode
重命名
The text was updated successfully, but these errors were encountered: