Added clear and clearPop to README
This commit is contained in:
parent
ebe84962b9
commit
2fba62708f
|
@ -66,6 +66,11 @@ other.add(9)
|
||||||
other.add(10)
|
other.add(10)
|
||||||
queue.extend(@[5, 6, 7, 8])
|
queue.extend(@[5, 6, 7, 8])
|
||||||
queue.extend(other)
|
queue.extend(other)
|
||||||
|
|
||||||
|
# Clears the queue in O(1) time
|
||||||
|
queue.clear()
|
||||||
|
# Clears the queue in O(n) time
|
||||||
|
queue.clearPop()
|
||||||
```
|
```
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
|
|
Loading…
Reference in New Issue