code-chronicles-code / code-chronicles-code/leetcode-curriculum
Add a `partition` goody
- 主要語言
- TypeScript
- 星號
- 20
- 分支
- 12
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Inspiration from Ruby: https://rubydoc.info/stdlib/core/Enumerable:partition
A reasonable place for it to live would be on `Iterator.prototype`, then anything that can give us an iterator can also be partitioned.
Should we return two arrays like Ruby does or two iterators? I'm currently thinking that two arrays is fine. Two iterators would only be better if these iterators are lazy, but that doesn't seem worth the overhead currently.
貢獻指南
研究方向
Start by locating Iterator.prototype and reviewing the existing goodies attached to it. Resolve whether partition should return two arrays or two iterators, then implement the selected behavior and add coverage showing that an iterator can be partitioned into the two expected results.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- typescript
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100