Skip to content

gittheking/linked_lists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

JavaScript Linked List Implementation

This file is meant for educational purposes only

What this is...

Using JavaScript prototype pattern, I've created an implementation of a Singly Linked Node List. The file linked_list.js includes a Node class, SinglyLinkedList class, prototype methods for the SinglyLinkedList class, and some testing of behavior that outputs results to the console.

Functionality

  • You can arbitrarily add and delete nodes from a singly linked list.
  • Stack behavior
    • push
    • pop
    • top
  • Queue behavior
    • enqueue
    • dequeue
    • peek

How to Run (using a terminal node REPL)

  • Clone repo by running:
$ git clone git@github.com:gittheking/linked_lists.git
  • Navigate into the linked_list directory
  • If you have Node installed on your machine you can run the .js file with
$ node linked_list.js
  • Play with it and test your understanding of LL's.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published