Datastructures in Ruby
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 5 commits ahead of akshaymankar:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rvmrc
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
rdata.gemspec
version

README.md

RData

Code Climate Build Status Dependency Status

Installation

gem install rdata

Or in a Gemfile

gem 'rdata'

Usage

require 'rdata'

Stacks

Initialization

@stack = RData.Stack

Operations

@stack.push(x) 		# => Returns 'x'
@stack.pop 			# => Returns 'top'
@stack.top 			# => Returns 'top'
@stack.is_empty? 	# => Returns true/false

More on Stacks

Stacks - Wiki Link