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

Show input constraints on problems

Aperta
#12 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, next.js, node.js

Direzione di ricerca

Read backend/arena/docs/problems.md and inspect backend/arena/scripts/validate-problems.js, frontend/pages/problems/[slug].js, and frontend/pages/battle.js. Run cd backend && npm run validate:problems to understand the current checks. Done means constraints are documented, checked against test inputs where possible, rendered on both pages, and validation catches a test input that violates a stated bound.

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

Descrizione

enhancement good first issue help wanted

Problems never state input sizes. Players cannot tell whether a quadratic solution is fine or will time out, so they find out by failing hidden tests.

What to do

  • Add an optional constraints field to the problem format: a short list of strings such as "1 <= scores.length <= 10^5". Document it in backend/arena/docs/problems.md.
  • Extend backend/arena/scripts/validate-problems.js to check, where it can, that every test input actually stays inside the stated bounds for simple numeric and length constraints.
  • Show constraints under the examples wherever the description renders (frontend/pages/problems/[slug].js, frontend/pages/battle.js).
  • Add constraints to as many of the 45 problems as you can. Partial coverage across several pull requests is fine.

Definition of done

  • cd backend && npm run validate:problems passes, and fails if you add a test that breaks a stated bound.
  • Constraints render in practice and battles.
Lingua principale
JavaScript
Stelle
0
Fork
2
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 sennaicodes/codearena

Tutte le issue di sennaicodes/codearena

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.