mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Update is_tree_symmetric.py
This commit is contained in:
parent
93c8e2abf7
commit
d5089d5b0e
@ -1,3 +1,7 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# author: bt3gl
|
||||||
|
|
||||||
def is_symmetrical(root: Optional[TreeNode]) -> bool:
|
def is_symmetrical(root: Optional[TreeNode]) -> bool:
|
||||||
|
|
||||||
stack = [(root, root)]
|
stack = [(root, root)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user