Add `mins` and `maxes` TypeScript goodies
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- typescript
- Domaine
- tooling
Piste de recherche
Commencez par localiser Iterator.prototype.min et Iterator.prototype.max, puis lisez les utilitaires BinaryHeap et compareNatural. Examinez les noms proposés Iterator.prototype.mins et Iterator.prototype.maxes, ainsi que la manière dont le comparateur serait géré pour chacun. C’est terminé lorsque les deux utilitaires proposés fonctionnent pour plusieurs minima ou maxima ; le comportement de NaN peut rester hors du périmètre initial.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The Ruby min and max methods allow specifying an argument, to get more than one minimum or maximum. I think it'd be fun to add a goody for this, but rather than modifying Iterator.prototype.min and/or Iterator.prototype.max, I think we should have new goodies for this, since it's a somewhat niche need.
I'm proposing Iterator.prototype.mins and Iterator.prototype.maxes as the names for these, although other suggestions are welcome.
For the implementation, BinaryHeap would be fun to use. It will be easiest to start with .maxes (since the default behavior of the heap is as a min-heap, and we can use compareNatural goody as the default comparator). For .mins, it will be necessary to come up with a way to reverse the comparator.
Additional note: min and max handle NaN specially. We can skip that behavior to start with for .mins and .maxes, and come back to it later.
- Langage dominant
- TypeScript
- Étoiles
- 20
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de code-chronicles-code/leetcode-curriculum
-
enhancement kotlin
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
good first issue tests
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
-
Add tests for `swap` utility Ouvertegood first issue tests
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
-
good first issue tests
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
code-chronicles-code/leetcode-curriculum#418 · 1 commentaire ·
Toutes les issues de code-chronicles-code/leetcode-curriculum
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
mksglu/context-mode#1200 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
AOSSIE-Org/DebateAI#582 · 2 commentaires ·