Stack Sourav
stack implementation in ruby
Usage
require "stack_sourav"
stack = Stack::Singly.new(1) # intialize with intial data as 1
stack.push(data) # pushes data
stack.pop # pops out data
stack.is_empty? # returns true if stack is emptyProject
stack implementation in ruby
require "stack_sourav"
stack = Stack::Singly.new(1) # intialize with intial data as 1
stack.push(data) # pushes data
stack.pop # pops out data
stack.is_empty? # returns true if stack is empty