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

Add a `partition` goody

Ouverte
#115 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement typescript
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

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.