Skip to content

wdi-sf-march-2014/doubly_linked_list_lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 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:

  • getIndex
  • setIndex
  • head
  • tail
  • 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 for doubly linked lists

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published