Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ainevsia/Leetcode-Rust
/ swap
Method
swap
99. Recover Binary Search Tree/Solution.cpp:40–44 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
38
}
39
40
void swap() {
41
int tmp = sw1->val;
42
sw1->val = sw2->val;
43
sw2->val = tmp;
44
}
45
46
void recoverTree(TreeNode* root) {
47
traverse(root);
Callers
5
missing_number
Method · 0.80
simulate_anneal
Function · 0.80
sort_colors
Method · 0.80
next_permutation
Method · 0.80
next_permutation
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected