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

Function isValidBalanceFactor

Data-Structures/Tree/AVLTree.js:116–117  ·  view source on GitHub ↗
(balanceFactor)

Source from the content-addressed store, hash-verified

114
115// Helper: To check if the balanceFactor is valid
116const isValidBalanceFactor = (balanceFactor) =>
117 [0, 1, -1].includes(balanceFactor)
118
119// rotations of AVL Tree
120const leftRotate = function (node) {

Callers 2

delBalanceFunction · 0.85
insertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected