Class: LinkedList

LinkedList

handsontable/src/utils/dataStructures/linkedList.js, line 51

Methods

handsontable/src/utils/dataStructures/linkedList.js, line 160

hasCycle(){Boolean}

Check if linked list contains cycle.

Returns: {Boolean} Returns true if linked list contains cycle.
handsontable/src/utils/dataStructures/linkedList.js, line 101

inorder(callback)

In order traversal of the linked list.

Parameters:
Name Type Description
callback function

Callback which should be executed on each node.

handsontable/src/utils/dataStructures/linkedList.js, line 189

pop(){NodeStructure}

Return last node from the linked list.

Returns: {NodeStructure} Last node.
handsontable/src/utils/dataStructures/linkedList.js, line 61

push(data)

Add data to the end of linked list.

Parameters:
Name Type Description
data Object

Data which should be added.

handsontable/src/utils/dataStructures/linkedList.js, line 219

recursiveReverse()

Reverses the linked list recursively

handsontable/src/utils/dataStructures/linkedList.js, line 116

remove(data){Boolean}

Remove data from the linked list.

Parameters:
Name Type Description
data Object

Data which should be removed.

Returns: {Boolean} Returns true if data has been removed.
handsontable/src/utils/dataStructures/linkedList.js, line 243

reverse()

Reverses the linked list iteratively

handsontable/src/utils/dataStructures/linkedList.js, line 205

shift(){NodeStructure}

Return first node from the linked list.

Returns: {NodeStructure} First node.
handsontable/src/utils/dataStructures/linkedList.js, line 81

unshift(data)

Add data to the beginning of linked list.

Parameters:
Name Type Description
data Object

Data which should be added.