mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-06-23 22:34:11 -04:00
Update preorder_transversal.py
This commit is contained in:
parent
35b14ddfde
commit
092700f566
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# author: bt3gl
|
||||||
|
|
||||||
# recursive and iterative inorder traversal
|
# recursive and iterative inorder traversal
|
||||||
|
|
||||||
def preorder_recursive(root: Optional[TreeNode]) -> list[int]:
|
def preorder_recursive(root: Optional[TreeNode]) -> list[int]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue