mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-24 10:33:34 +08:00
build
This commit is contained in:
@@ -386,13 +386,6 @@ comments: true
|
||||
=== "Swift"
|
||||
|
||||
```swift title="my_heap.swift"
|
||||
var maxHeap: [Int]
|
||||
|
||||
/* 构造函数,建立空堆 */
|
||||
init() {
|
||||
maxHeap = []
|
||||
}
|
||||
|
||||
/* 获取左子结点索引 */
|
||||
func left(i: Int) -> Int {
|
||||
2 * i + 1
|
||||
|
||||
Reference in New Issue
Block a user