Skip to content

Instantly share code, notes, and snippets.

@hochgi
Last active July 27, 2021 13:37
Show Gist options
  • Save hochgi/787466c89ffbe1414ab7c80d13060b0e to your computer and use it in GitHub Desktop.
Save hochgi/787466c89ffbe1414ab7c80d13060b0e to your computer and use it in GitHub Desktop.
Tree parsing exercise python
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