require 'compsci/heap' require 'compsci/timer' include CompSci runtime = (ARGV.shift || "3").to_i puts < runtime } puts "pushed %i items in %0.1f s" % [count, Timer.since(start)] puts print "still a heap with #{h.size} items? " answer, elapsed = Timer.elapsed { h.heap? } puts "%s - %0.3f sec" % [answer ? 'YES' : 'NO', elapsed] puts