code-chronicles-code / code-chronicles-code/leetcode-curriculum
Investigate performance of delegating `yield` in tree traversals
Đang mở
enhancement
- Ngôn ngữ chính
- TypeScript
- Star
- 20
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
It would be really cool if we could use `yield*` (TypeScript) and `yield from` (Python) or perhaps even `Stream.concat` (Java) in the tree traversal goodies to write the traversals recursively -- the code would read very naturally. However, I'm not sure about the performance implications of doing so.
Let's investigate the performance of these relative to the implementations that manage their own stack. If the recursive implementation is comparable in performance, then I think it should win on the grounds of the code being much nicer.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.