Skip to content

Commit

Permalink
Merge 8683142 into 6a242cc
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonheecs committed Sep 20, 2018
2 parents 6a242cc + 8683142 commit c0fa716
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/binary-search-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,7 @@ export default class BST {
return;
}

let tmp = node.left;
node.left = node.right;
node.right = tmp;
[node.left, node.right] = [node.right, node.left];

invertSubtree(node.left);
invertSubtree(node.right);
Expand Down

0 comments on commit c0fa716

Please sign in to comment.