Skip to content

JS implementation of a Linked List, including merge sort, selection sort, and insertion sort

Notifications You must be signed in to change notification settings

spenserg/linkedlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

JS Linked List Implementation

Includes: Node and LinkedList classes

LinkedList functions:

  • append (int value, Node next = undefined) Appends node to the end of the list. Returns string interpretation of new list.

  • build_linked_list (Array data) Creates a LinkedList from data in the given array. Returns new LinkedList.

  • insert (int index, int value) Inserts value at given index. Returns string interpretation of new list.

  • len () Returns number of nodes in list

  • print_linked_list

  • remove (int value) Removes first occurrence of value. Returns string interpretation of list.

  • removeIndex (int index) Removes node at index. Returns string interpretation of list.

Sorting Algorithms:

  • inssort = Insertion Sort
  • mergesort = Merge Sort
  • selsort = Selection Sort

About

JS implementation of a Linked List, including merge sort, selection sort, and insertion sort

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published