Skip to content

shelbys/ruby-linked-list

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Linked List

This is my implementation of a linked list in Ruby.

Quick Example

require './linked_list'

list = List.new(1, 2, 3)
p list.to_a #=> [1, 2, 3]

list.push(4) 
p list.to_a #=> [1, 2, 3, 4]

list.pop
p list.to_a #=> [1, 2, 3]

list.unshift(0)
p list.to_a #=> [0, 1, 2, 3]

list.shift
p list.to_a #=> [1, 2, 3]

About

Implementation of a linked list in Ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published