Symmetric Tree LeetCode Solution

🧠 Day 32 / 100 – DSA Practice Solved Symmetric Tree on LeetCode 🌳✅ 🔹 Problem: Check whether a binary tree is a mirror of itself (symmetric around its center). 🔹 Approach: Used a recursive mirror check: Compare left subtree with right subtree Check if: ✔️ Values are equal ✔️ Left of one == Right of other ✔️ Right of one == Left of other 🔁 Recursively verified symmetry at each level 🔹 Complexity: ⏱ Time → O(n) 📦 Space → O(n) (recursion stack) 💯 Result: ✔️ All test cases passed ⚡ Runtime: 0 ms (Beats 100%) Understanding recursion patterns in trees is getting stronger day by day 🚀 #Day32 #100DaysOfCode #LeetCode #Java #DSA #BinaryTree #Recursion #CodingJourney

  • graphical user interface, text, application

To view or add a comment, sign in

Explore content categories