Skip to content

Commit e4fc1cd

Browse files
committed
heaps docs code block comment alignment
1 parent 5d2defb commit e4fc1cd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/src/heaps.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ provides the following interface:
3333
```julia
3434
# Let `h` be a heap, `i` be a handle, and `v` be a value.
3535

36-
i = push!(h, v) # adds a value to the heap and and returns a handle to v
36+
i = push!(h, v) # adds a value to the heap and and returns a handle to v
3737

38-
update!(h, i, v) # updates the value of an element (referred to by the handle i)
38+
update!(h, i, v) # updates the value of an element (referred to by the handle i)
3939

40-
delete!(h, i) # deletes the node with handle i from the heap
40+
delete!(h, i) # deletes the node with handle i from the heap
4141

42-
v, i = top_with_handle(h) # returns the top value of a heap and its handle
42+
v, i = top_with_handle(h) # returns the top value of a heap and its handle
4343
```
4444

4545
Currently, both min/max versions of binary heap (type `BinaryHeap`) and
@@ -49,16 +49,16 @@ Examples of constructing a heap:
4949

5050
```julia
5151
h = BinaryMinHeap{Int}()
52-
h = BinaryMaxHeap{Int}() # create an empty min/max binary heap of integers
52+
h = BinaryMaxHeap{Int}() # create an empty min/max binary heap of integers
5353

5454
h = BinaryMinHeap([1,4,3,2])
55-
h = BinaryMaxHeap([1,4,3,2]) # create a min/max heap from a vector
55+
h = BinaryMaxHeap([1,4,3,2]) # create a min/max heap from a vector
5656

5757
h = MutableBinaryMinHeap{Int}()
58-
h = MutableBinaryMaxHeap{Int}() # create an empty mutable min/max heap
58+
h = MutableBinaryMaxHeap{Int}() # create an empty mutable min/max heap
5959

6060
h = MutableBinaryMinHeap([1,4,3,2])
61-
h = MutableBinaryMaxHeap([1,4,3,2]) # create a mutable min/max heap from a vector
61+
h = MutableBinaryMaxHeap([1,4,3,2]) # create a mutable min/max heap from a vector
6262
```
6363

6464
## Using alternate orderings
@@ -119,7 +119,7 @@ This package includes an implementation of a binary min-max heap (`BinaryMinMaxH
119119
120120
Examples:
121121
```julia
122-
h = BinaryMinMaxHeap{Int}() # create an empty min-max heap with integer values
122+
h = BinaryMinMaxHeap{Int}() # create an empty min-max heap with integer values
123123

124124
h = BinaryMinMaxHeap([1, 2, 3, 4]) # create a min-max heap from a vector
125125
```

0 commit comments

Comments
 (0)