Solving Problems
The problem-solving workflow
Master the art of submitting solutions.
Problem Page Layout
When you open a problem, you'll see:
- Left Panel — Problem description, examples, constraints
- Right Panel — Code editor
- Bottom — Console/output area
Understanding the Problem
- Read the description carefully — Understand what's being asked
- Check examples — Work through them manually
- Note constraints — Size limits affect your approach
- Look for edge cases — Empty inputs, single elements, etc.
Writing Your Solution
Choose Your Language
Supported languages:
- JavaScript
- Python
- C++
- Java
- Go
- Rust
Code Editor Features
| Feature | Shortcut |
|---|---|
| Run code | Ctrl+Enter |
| Submit | Ctrl+Shift+Enter |
| Format code | Alt+Shift+F |
| Toggle console | `Ctrl+`` |
Testing Your Code
Custom Test Cases
- Click Custom Input
- Enter your test case
- Click Run
- Check output against expected
Run vs Submit
| Action | What it does |
|---|---|
| Run | Tests against sample cases only |
| Submit | Tests against all hidden cases |
Submission Verdicts
| Verdict | Meaning |
|---|---|
| ✅ Accepted | All tests passed! |
| ❌ Wrong Answer | Output doesn't match expected |
| ⏱️ Time Limit Exceeded | Code too slow |
| 💥 Runtime Error | Code crashed |
| 🔴 Compilation Error | Syntax error |
| 📦 Memory Limit Exceeded | Using too much memory |
After Solving
- View solutions — See how others solved it
- Read editorial — Official explanation
- Mark for review — Revisit later
- Share — Show off your solve!
Tips for Success
- Start with brute force — Get it working first
- Optimize later — Only if needed
- Test edge cases — Before submitting
- Read error messages — They're helpful!
Next: Difficulty Levels