MCPcopy Create free account
hub / github.com/aylei/leetcode-rust / Solution

Class Solution

src/solution/s0099_recover_binary_search_tree.rs:56–56  ·  view source on GitHub ↗

* [99] Recover Binary Search Tree * * Two elements of a binary search tree (BST) are swapped by mistake. * * Recover the tree without changing its structure. * * Example 1: * * * Input: [1,3,null,null,2] * * 1 * / * 3 * \ * 2 * * Output: [3,1,null,null,2] * * 3 * / * 1 * \ * 2 * * * Example 2: * * * Input: [3,1,4,null,

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected