Summary
Refactor the problem metadata system by moving hardcoded values from the frontend into the database schema and ensuring each problem has accurate metadata.
Current Behavior
Several problem details are currently hardcoded or use default values instead of being fetched from the database.
Examples:
- Constraints use the same default value for every problem.
- Hidden test case count is hardcoded.
- Hints are hardcoded in the frontend.
- The problem schema does not support storing hints.
- The problem schema does not support hidden test case metadata.
As a result, different problems cannot display their own metadata accurately.
Proposed Implementation
Update Problem Schema
Add support for:
- Constraints
- Hints
- Hidden Test Case Count
- Hidden Test Case Metadata (if required)
Database Migration
Update existing problems with:
- Correct constraints
- Problem-specific hints
- Hidden test case information
Frontend Changes
Remove hardcoded values and fetch metadata directly from the backend.
Replace hardcoded:
- Constraints
- Hints
- Hidden test case count
with dynamic API data.
Current Flow
Open Problem
│
▼
Fetch Problem
│
▼
Frontend injects:
- Default Constraints
- Hardcoded Hints
- Hardcoded Hidden Test Cases
Proposed Flow
Open Problem
│
▼
Fetch Problem
│
▼
Receive Complete Metadata
│
▼
Display:
- Constraints
- Hints
- Hidden Test Cases
- Other Problem Details
Benefits
- Accurate problem information
- Easier to manage problems
- No frontend hardcoding
- Better scalability
- Cleaner architecture
- Easier to add new problems
Acceptance Criteria

Summary
Refactor the problem metadata system by moving hardcoded values from the frontend into the database schema and ensuring each problem has accurate metadata.
Current Behavior
Several problem details are currently hardcoded or use default values instead of being fetched from the database.
Examples:
As a result, different problems cannot display their own metadata accurately.
Proposed Implementation
Update Problem Schema
Add support for:
Database Migration
Update existing problems with:
Frontend Changes
Remove hardcoded values and fetch metadata directly from the backend.
Replace hardcoded:
with dynamic API data.
Current Flow
Proposed Flow
Benefits
Acceptance Criteria