Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3376 - InorderTraversal #19655

Open
zhaoyao91 opened this issue Nov 23, 2022 · 1 comment
Open

3376 - InorderTraversal #19655

zhaoyao91 opened this issue Nov 23, 2022 · 1 comment
Labels
3376 answer Share answers/solutions to a question en in English

Comments

@zhaoyao91
Copy link

type InorderTraversal<T extends TreeNode | null, L extends TreeNode | null = T extends TreeNode ? T['left'] : null, R extends TreeNode | null = T extends TreeNode ? T['right'] : null> = 
  T extends TreeNode
    ? [...InorderTraversal<L>, T['val'], ...InorderTraversal<R>]
    : []
@zhaoyao91 zhaoyao91 added answer Share answers/solutions to a question en in English labels Nov 23, 2022
@github-actions github-actions bot added the 3376 label Nov 23, 2022
@zhaoyao91
Copy link
Author

更好的解:#8046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3376 answer Share answers/solutions to a question en in English
Projects
None yet
Development

No branches or pull requests

1 participant