code-chronicles-code / code-chronicles-code/leetcode-curriculum
Add a `partition` goody
- Langage dominant
- TypeScript
- Étoiles
- 20
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100