Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Least Common Multiple for a array of elements.

Aperta
#1,154 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@mukund1606 ci sta già lavorando.

Dal 25/7/2024.

  • #1156 di @mukund1606 — aperta
  • #1158 di @Parvezkhan0 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
backend

Direzione di ricerca

The issue does not name a file or test. Start by locating the existing leastCommonMultiple implementation and its tests, then determine where the array form belongs. Done means an array of elements produces the expected least common multiple and the relevant tests cover the new behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

It will be better to also have a leastCommonMultiple function for an array where I could pass an array of elements and get the result.

export default function leastCommonMultiple(a, b) {
  return ((a === 0) || (b === 0)) ? 0 : Math.abs(a * b) / euclideanAlgorithm(a, b);
}
Lingua principale
JavaScript
Stelle
197k
Fork
31k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di trekhleb/javascript-algorithms

Tutte le issue di trekhleb/javascript-algorithms

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.