mirror of
https://github.com/emirpasic/gods.git
synced 2026-06-15 16:16:35 +03:00
ArrayList addition (inc. test, example and documentation)
This commit is contained in:
@@ -32,6 +32,7 @@ func ArrayStackExample() {
|
||||
stack := arraystack.New() // empty
|
||||
stack.Push(1) // 1
|
||||
stack.Push(2) // 1, 2
|
||||
stack.Values() // 2, 1 (LIFO order)
|
||||
_, _ = stack.Peek() // 2,true
|
||||
_, _ = stack.Pop() // 2, true
|
||||
_, _ = stack.Pop() // 1, true
|
||||
|
||||
Reference in New Issue
Block a user