Skip to content

Commit 05da480

Browse files
authored
fixed formatting 0951-flip-equivalent-binary-trees.js
1 parent 59ea602 commit 05da480

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/0951-flip-equivalent-binary-trees.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
var flipEquiv = function(root1, root2) {
1818

1919
const dfs = (node1, node2) => {
20-
if(!node1 && !node2) return true;
21-
if(!node1) return false;
22-
if(!node2) return false;
20+
if (!node1 && !node2) return true;
21+
if (!node1) return false;
22+
if (!node2) return false;
2323

24-
if(node1.val !== node2.val) return false;
24+
if (node1.val !== node2.val) return false;
2525

26-
if((node1.left && node1.left.val) !== (node2.left && node2.left.val)) {
26+
if ((node1.left && node1.left.val) !== (node2.left && node2.left.val)) {
2727
return dfs(node1.right, node2.left) && dfs(node1.left, node2.right);
2828
}
2929

0 commit comments

Comments
 (0)