Skip to content

Commit 64c9404

Browse files
committed
Added usage sample for PriorityQueue
1 parent 4b2fc0b commit 64c9404

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//: [Previous](@previous)
2+
3+
import Foundation
4+
5+
//: Usage:
6+
7+
var queue = PriorityQueue<Int>(elements: [2, 1, 4, 3, 5], order: >)
8+
queue.enqueue(9)
9+
10+
print(#function + " queue: " , queue)
11+
12+
//: [Next](@next)

Data Structures.playground/contents.xcplayground

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<page name='Tree'/>
1010
<page name='Graph'/>
1111
<page name='Heap'/>
12+
<page name='PriorityQueue'/>
1213
</pages>
1314
</playground>

0 commit comments

Comments
 (0)