List

List
Instance Members
size
back
front
add(element)
push(element)
unshift(element)
remove(element)
pop()
shift()
isEmpty()
contains(element)
findOne(condition)
find(condition)
forEach(f)
get(i)
set(i, element)
getIndex(element)
toArray()

SelfOrganizingList

new SelfOrganizingList(arr: Array)

Extends List

Parameters
arr (Array = []) the list is instantiated with an empty list unless an Array is passed as parameter.
Instance Members
add(element)
push(element)
unshift(element)
findOne(condition)
find(condition)

BinaryTree

new BinaryTree(arr: Array, comparator: function)
Parameters
arr (Array = []) the tree is instantiated with an empty tree unless an Array is passed as parameter.
comparator (function = (a,b)=>a==b?0:a>b?1:-1) the function that will be used.
Instance Members
size
add(element)
addArray(arr)
remove(element)
contains(element)
forEach(f, walk, dfsType)
dfs(order, f)
bfs(f)
isEmpty()
toArray()
clear()
clone()
rotateLeft(p)
rotateRight(q)

AVLTree

new AVLTree(arr: Array, comparator: function)

Extends BinaryTree

Parameters
arr (Array = []) the tree is instantiated with an empty unless an Array is passed as parameter.
comparator (function = (a,b)=>a==b?0:a>b?1:-1) the function that will be used.
Instance Members
add(element)
remove(element)
rotateLeft()
rotateRight()

TreeMap

new TreeMap(comparator: function)

Extends BinaryTree

Parameters
comparator (function = (a,b)=>a==b?0:a>b?1:-1) the function that will be used.
Instance Members
add(key, value)
addArray(arr)
remove(key)
get(key)
contains(key)
containsKey(key)
containsValue(value)
clone()

AVLMap

new AVLMap(comparator: function)

Extends AVLTree

Parameters
comparator (function = (a,b)=>a==b?0:a>b?1:-1) the function that will be used.
Instance Members
add(key, value)
addArray(arr)
remove(key)
get(key)
contains(key)
containsKey(key)
containsValue(value)
clone()