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

Add a `partition` goody

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

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.

Hướng dẫn đóng góp

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

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

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.