Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Show input constraints on problems

Open
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active

Research direction

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.

Written by the indexing model from the issue text.

Description

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.
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sennaicodes/codearena

All issues in sennaicodes/codearena

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.