require "sungemm/version" module Sungemm def self.fibo_finder(n) if (0..1).include?(n) n else fibo_finder(n-2)+fibo_finder(n-1) end end class Stack def initialize(array) @array = array end def pop(count = 1) r=@array.pop(count).reverse r=r.last if count==1 r end def push(values) values.each {|x| @array << x} true end def to_a @array end end class Queue def initialize(array) @array = array end def pop(count = 1) r = @array.shift(count) r = r.first if count == 1 r end def push(values) values.each { |x| @array << x } true end def to_a @array end end end