External Structures

These are the exported data structures.

BinarySearchTree

new BinarySearchTree()
Static Members
▸ checkKeyIsValid(key)
Instance Members
▸ root
▸ insert(key, value, currentNode)
▸ get(key, currentNode, parentNode)
▸ has(key)
▸ min(currentNode)
▸ max(currentNode)
▸ remove(key, currentNode)
▸ _transplant(existingNode, replacementNode)

LinkedList

new LinkedList()
Instance Members
▸ head
▸ length
▸ insert(value, node)
▸ insertAt(value, position)
▸ insertFirst(value)
▸ get(value)
▸ findAt(position)
▸ positionOf(value)
▸ deleteAt(position)
▸ delete(value)
▸ toArray()
▸ _checkIsInBounds(num)

Internal Structures

These are non-exported data structures that are used internally.

BinarySearchTreeNode

new BinarySearchTreeNode(key: number, value: any)
Parameters
key (number)
value (any)
Instance Members
▸ key
▸ value
▸ parent
▸ left
▸ right

LinkedListNode

new LinkedListNode(value: any)
Parameters
value (any)
Instance Members
▸ value
▸ next