Last active
July 27, 2021 13:37
-
-
Save hochgi/787466c89ffbe1414ab7c80d13060b0e to your computer and use it in GitHub Desktop.
Tree parsing exercise python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional | |
class Tree: | |
def __init__(self, value: int, children: list): | |
self.value = value | |
self.children = children # list of Tree | |
def format_tree(t: Tree) -> str: | |
pass | |
def parse_tree(s: str) -> Optional[Tree]: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment