JavaScript Tree Linked List: Create a binary tree and/or a double linked list

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 143 All time: 345 This week: 1Up
Version License JavaScript version Categories
ttreelist 1.0.2GNU Lesser Genera...1.2Data types
Description Author

This object can create a binary tree and/or a double linked list.

It can create a binary tree and/or a double linked list from values taken from arrays or objects.

The object can also traverse the tree starting from the root element, the first element or the last element and move up, left, right, back and forth.

Innovation Award
JavaScript Programming Innovation award nominee
May 2014
Number 3

Prize: One year Codenvy Developer hosted cloud IDE premium plan
Binary trees and linked lists are often used by applications that need to add and remove lists of elements dynamically.

This object can manage lists of elements managed as binary tries or linked lists.

Manuel Lemos
Picture of Thomas Björk
  Performance   Level  
Name: Thomas Björk <contact>
Classes: 5 packages by
Country: Sweden Sweden
Age: 54
All time rank: 381 in Sweden Sweden
Week rank: 6 Up1 in Sweden Sweden Equal
Innovation award
Innovation award
Nominee: 4x

TreeList ========= TreeList is an implementation of a binaty tree combined with a double linked list. You can easily build an hierarchy of your objects or arrays on a specified index. Class TTreeList --------------- properties root The root node of the tree first The first node of the double linked list last The last node of the double linked list treeCount The number of nodes in the tree and double linked list isDirty Set if a node has been added since the last build functions add Add a new node to the tree/double linked list count The number of nodes in the raw tree (includes nodes with duplicate values) search Search for a node by value in the tree build Build a tree and a double linked list Class TTreeListNode ------------------- properties prev A pointer to the previous node in the double linked list left A pointer to the left node in the tree parent A pointer to the parent node in the tree right A pointer to the right node in the tree next A pointer to the next node in the double linked list functions addPayload Add a node from the TTreeList. If the value is a duplicate then it is added as well getPayloadCount Return the number of payloads this node holds setPayloadIndex Set the index for which payload should return a value with the get function get Return the value of the given index from the active payload
  Files folder image Files  
File Role Description
Accessible without login Plain text file example.html Example A simple example
Accessible without login Plain text file readme.txt Doc. Simple documentation
Accessible without login Plain text file Data Auxiliary data
Plain text file treelist.js Class Class definitions

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:345
This week:1Up
User Comments (1)
Thank you for this.
8 years ago (hong jaemin)