GithubHelp home page GithubHelp logo

salamandermike / singly_linked_list_ruby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wdi-sf-july/singly_linked_list_ruby

0.0 2.0 0.0 83 KB

a test driven implementation of a singly linked list

singly_linked_list_ruby's Introduction

Linked Lists

A TDD Experience

Conceptual Overview

A linked list is a data structure of storing a collection items. To start a linked list is a collection of nodes, and each node has a value and a referenece to the next node. This links each node together through a chain of references. The linked list only needs to store the first node in the chain to maintain the collection of nodes.

How to make one?

What ingredients do we need from description above?

  • List: a class to model linked lists
    • List::Node a class to link values to gether
      • value: a value associated with the node
      • next: a reference to the next node
    • List#head: a reference to the first node in the list.

Note: we are using a separate node class to link each item in the list together. This makes defining the tail of the list essentially a copying exercise into a new list.

Goal

Get all the specs passing for each spec in the following order:

  • list_node_spec.rb
  • list_basic_spec.rb
  • list_insertion_spec.rb
  • list_iterators_spec.rb
  • list_extra_spec.rb

list

singly_linked_list_ruby's People

Watchers

James Cloos avatar Michael avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.