Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,8 +1,13 @@
|
|||
stack = [] of Int32
|
||||
(1..10).each do |x|
|
||||
stack.push x
|
||||
end
|
||||
# push
|
||||
stack.push 10
|
||||
stack << 10
|
||||
|
||||
10.times do
|
||||
puts stack.pop
|
||||
end
|
||||
# pop
|
||||
var = stack.pop
|
||||
|
||||
# empty
|
||||
flag = stack.empty?
|
||||
|
||||
# top / peek
|
||||
var = stack.last
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue