MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / leftRotate

Function leftRotate

Data-Structures/Tree/AVLTree.js:120–127  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

118
119// rotations of AVL Tree
120const leftRotate = function (node) {
121 const temp = node._right
122 node._right = temp._left
123 temp._left = node
124 updateHeight(node)
125 updateHeight(temp)
126 return temp
127}
128const rightRotate = function (node) {
129 const temp = node._left
130 node._left = temp._right

Callers 2

insertBalanceFunction · 0.85
delBalanceFunction · 0.85

Calls 1

updateHeightFunction · 0.85

Tested by

no test coverage detected