Home > Reflections | ⏮️ ⏭️
2024-07-08
🏋 Coding Practice
Today I’ll implement the more direct recursive solution discussed yesterday.
101. Symmetric Tree
Given the
root
of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).
🪞 Reflections
- This is a shorter and more direct solution that what I came up with on my own.
- While I didn’t time it, this only took a few minutes to implement.
- It may be another nice exercise to mechanically translate this unusual recursive function into an iterative function.