MCPcopy Index your code
hub / github.com/neetcode-gh/leetcode / convertBST

Method convertBST

java/0538-convert-bst-to-greater-tree.java:5–8  ·  view source on GitHub ↗
(TreeNode root)

Source from the content-addressed store, hash-verified

3 private int curSum = 0;
4
5 public TreeNode convertBST(TreeNode root) {
6 convertBSTRecursive(root);
7 return root;
8 }
9
10 private void convertBSTRecursive(TreeNode node) {
11 if (node == null) {

Callers

nothing calls this directly

Calls 4

convertBSTRecursiveMethod · 0.95
isEmptyMethod · 0.45
pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected