Update preorder_transversal.py

This commit is contained in:
bt3gl 2023-07-30 15:52:59 -07:00 committed by GitHub
parent 35b14ddfde
commit 092700f566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]: