Skip to content

wdi-sf-jan-2014/DoublyLinkedListLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DoublyLinkedListLab

A lab to implement a doubly linked list in ruby. Use the specs for node and list to implement a doubly linked list.

FIRST: Work on the node class and get the specs passing.

SECOND: For the list implementation, the methods should have a similar interface to ruby array. Here are the first methods you should implement:

  • new (initialize)
  • push
  • pop
  • length

THIRD: work on these methods:

  • []
  • []=
  • first
  • last
  • shift
  • unshift
  • insert
  • delete_at

LASTLY: if you have time, implement the following methods:

  • reverse
  • max
  • min
  • reduce
  • each
  • flatten

HINT: USE THE SPECS!! The specs will help you a lot. Make sure to run them and get them to pass for the first set of methods before you move on to the 2nd or 3rd set of methods.

About

A lab to implement a doubly linked list in ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages