cweill / Sorted-Circular-Doubly-Linked-List

A sorted circular doubly linked list implemented in both Coffeescript and Javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sorted Circular Doubly Linked List

A sorted circular doubly linked list implementated in both CoffeeScript and Javascript.

Made this since I couldn't find any other implementation of this particular datastructure in coffeescript or javascript. Features include the ability to insert, insertAll, remove, contains, find, and print the contents of the list. Simply overwrite the compare function to determine how you want your list sorted.

In order to use the list insert the desired elements into the list. Next beginning from the list.head, list.tail, or list.find(datum) node you can gracefully iterate through the circular list by accessing the prev, next, and datum node attributes.

Enjoy!

License

Sorted-Circular-Doubly-Linked-List is released under the MIT License.

About

A sorted circular doubly linked list implemented in both Coffeescript and Javascript.


Languages

Language:CoffeeScript 100.0%