code-chronicles-code / code-chronicles-code/leetcode-curriculum
Investigate performance of delegating `yield` in tree traversals
- 主要語言
- TypeScript
- 星號
- 20
- 分支
- 12
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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.
貢獻指南
研究方向
該 issue 未指出任何檔案、測試或進入點;首先定位自行管理堆疊的樹走訪實作。使用 TypeScript yield*、Python yield from 和 Java Stream.concat,將這些版本與遞迴走訪進行基準測試比較,然後報告效能是否相當,以及應優先採用哪種實作。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java, python, typescript
- 領域
- performance
- Issue 類型
- 重構
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100