MCPcopy Create free account
hub / github.com/TheAlgorithms/C-Plus-Plus / TryRightRotate

Method TryRightRotate

data_structures/tree_234.cpp:813–831  ·  view source on GitHub ↗

* @brief A handy function to try if we can do a right rotate to the target * node * * Given two node, the parent and the target child, the right rotate * operation is uniquely identified. The source node must be the left * sibling of the target child. The operation can be successfully done if * the to_child has a left sibling and its left sibling is not 2-node. * * @param parent the parent

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

GetChildIndexMethod · 0.80
GetChildMethod · 0.80
Is2NodeMethod · 0.80

Tested by

no test coverage detected