mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-06-30 09:37:41 -04:00
11 lines
212 B
Python
11 lines
212 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
# author: bt3gl
|
|
|
|
def inorder(root) -> list:
|
|
|
|
if root is None:
|
|
return []
|
|
|
|
return inorder(root.left) + [root.val] + inorder(root.right)
|
|
|