code-chronicles-code / code-chronicles-code/leetcode-curriculum

Investigate performance of delegating `yield` in tree traversals

Đang mở
#300 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.