MCPcopy Create free account
hub / github.com/Ainevsia/Leetcode-Rust / isSymmetric

Method isSymmetric

101. Symmetric Tree/Solution.cpp:26–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24class Solution {
25public:
26 bool isSymmetric(TreeNode* root) {
27 if (root == NULL) return true;
28 else return isSymmetric(root->left, root->right);
29 }
30
31 bool isSymmetric(TreeNode * left, TreeNode * right) {
32 if (left == NULL and right == NULL) return true;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected