Getting Started with Sophocode
What is Sophocode?
Sophocode is an AI-powered coding interview practice platform built around one idea: wisdom over grinding.
The name comes from the Greek sophos (σοφός) — wisdom. Where LeetCode-style grinding builds muscle memory, Sophocode builds understanding. You'll practice with Sophia, your AI coach who guides you through the Clarify → Plan → Code → Reflect process.
How a Session Works
Every practice session follows the Clarify → Plan → Code → Reflect loop:
- Clarify — Read the problem and ask clarifying questions. Sophia will prompt you if you skip this step.
- Plan — Describe your approach before coding. Identify the pattern, state your complexity, and outline the algorithm.
- Code — Write your solution in the browser editor. Python runs in your browser via Pyodide — no server needed.
- Reflect — Review your solution. Sophia gives feedback on your approach, complexity, and what to work on next.
Choosing a Problem
From the Practice page, you can browse problems filtered by:
- Pattern (Sliding Window, Two Pointers, etc.)
- Difficulty (Easy, Medium, Hard)
If you're new, start with an Easy problem in a pattern you're curious about. The goal isn't to solve the hardest problems — it's to build pattern recognition from the ground up.
Getting Hints
Every problem has 3 progressive hints:
- Hint 1 — Points you toward the right pattern
- Hint 2 — Gives you the key insight or data structure
- Hint 3 — Provides the algorithm sketch
Wait at least 10-15 minutes before using a hint. The struggle before the hint is where learning happens.
Your Progress
Sophocode tracks:
- Which problems you've attempted and solved
- How many hints you needed
- Your mastery level per pattern
- Problems scheduled for spaced-repetition review
You don't need an account to start practicing. Guest sessions are stored locally and you can create an account later to sync progress across devices.
The 14 Patterns
| Pattern | What It Solves |
|---|---|
| Two Pointers | Pair finding, partitioning in sorted arrays |
| Sliding Window | Longest/shortest subarray/substring conditions |
| Fast & Slow Pointers | Cycle detection, middle of linked list |
| Merge Intervals | Overlapping intervals, scheduling |
| Cyclic Sort | Missing/duplicate numbers in [1,n] range |
| In-Place Reversal | Reversing linked lists without extra space |
| Tree BFS | Level-order traversal, shortest paths |
| Tree DFS | Path problems, subtree problems |
| Two Heaps | Median tracking, balanced partitions |
| Subsets/Backtracking | All combinations, permutations, subsets |
| Modified Binary Search | Rotated sorted arrays, searching on answer |
| Top K Elements | K largest/smallest/most frequent |
| K-way Merge | Merging K sorted lists/arrays |
| Dynamic Programming | Optimization, counting with overlapping subproblems |