Skip to content

kiizerd/linked_list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linked List Data Structure

Self-made Ruby LinkedList class with Node class

append(value) adds a new node containing value to the end of the list

prepend(value) adds a new node containing value to the start of the list

size returns total number of nodes in list

at(index) returns node at given index

pop removes the last element from the list

contains?(value) returns true if list contains value else returns false

find(value) returns index of node containing value else returns nil

to_s represents list as string

About

Self-made Ruby LinkedList class

Topics

Resources

Stars

Watchers

Forks

Languages