Loading content...
You've solved 150 problems over the past six months. Someone asks you: 'What problems have you done involving monotonic stacks?' You draw a blank. 'Which problem taught you that key DP state transition insight?' Nothing. 'What was your success rate on graph problems last month?' Complete uncertainty.
Without a problem log, your practice history is lost. You've invested hundreds of hours, but you can't access that investment strategically. You can't identify patterns across your experience. You can't find that brilliant solution you crafted three months ago. You can't even accurately assess your own strengths and weaknesses.
A problem log transforms scattered practice into structured intelligence. It's a personal database of every problem you've tackled—what you learned, how you struggled, what the key insights were. Done well, it becomes your most valuable DSA asset: a searchable, analyzable record that compounds in value as it grows.
By the end of this page, you will understand: (1) why problem logging is essential for serious DSA practice; (2) what fields to track for maximum value; (3) how to structure your log for easy searching and pattern analysis; (4) tools and templates for maintaining your log efficiently; and (5) how to leverage your log for interview preparation and continuous improvement.
A problem log serves multiple critical functions that casual practice can't provide.
Human memory is reconstructive and unreliable. You won't remember the insights from a problem you solved four months ago—not accurately. A problem log captures these insights when they're fresh, preserving them for future reference.
This is especially important for DSA because insights are often subtle: a particular way to think about state transitions, a clever edge case handling, a non-obvious optimization. These details evaporate from memory but remain accessible in your log.
When you can view 50 problems simultaneously, patterns emerge that are invisible when solving one at a time:
A queryable problem log enables this meta-level learning that dramatically accelerates growth.
Without data, self-assessment is guesswork: 'I think I'm bad at DP.' With a log, you can be precise: 'My solve rate on DP problems is 45% versus 78% for arrays. Specifically, I struggle with 2D state problems—10% solve rate compared to 60% on single-dimension DP.'
This precision enables targeted improvement. You don't vaguely 'study more DP'—you specifically focus on 2D state transitions.
When interview prep begins, your log becomes a goldmine:
Without a log, you're rebuilding this intelligence from scratch each interview cycle.
A problem log with 50 entries is useful. With 200 entries, it's powerful. With 500+ entries, it's irreplaceable. The log's value isn't linear—it compounds as patterns emerge from larger datasets and as you can review insights across years of practice.
A useful problem log captures the right information without becoming a burden to maintain. Here's a comprehensive schema with explanations for each field.
| Field | Example | Purpose |
|---|---|---|
| Problem Name | Two Sum | Human-readable identifier |
| Source & ID | LeetCode #1 | Enables finding problem again |
| URL | leetcode.com/problems/two-sum | Direct link for review |
| Date Attempted | 2024-11-15 | Tracks progress over time |
| Difficulty | Easy / Medium / Hard | Filters for targeted practice |
| Topics/Tags | Array, Hash Map, Two Pointers | Enables pattern-based queries |
| Companies | Google, Amazon, Meta | Company-specific interview prep |
| Field | Example | Purpose |
|---|---|---|
| Outcome | Solved / Partial / Failed / Gave Up | Honest success tracking |
| Time to Solve | 35 minutes | Speed benchmarking |
| Hints Used | None / Topic hint / Approach hint / Full solution | Independence level |
| Attempts | 3 (first try, retry after hint, retry next day) | Tracks mastery progression |
| Confidence (1-5) | 4 | Self-assessment for review priority |
| Time Complexity | O(n) | Solution analysis |
| Space Complexity | O(n) | Solution analysis |
| Field | Example | Purpose |
|---|---|---|
| Approach | Hash map to store complements; single pass | Quick solution recall |
| Key Insight | Instead of finding two numbers, find if complement exists | Core learning to remember |
| Mistakes Made | Initially tried O(n²) brute force; forgot edge case of same index | Error patterns to avoid |
| Alternative Approaches | Two-pointer after sorting (O(n log n)); brute force (O(n²)) | Complete picture |
| Similar Problems | 3Sum, 4Sum, Two Sum II | Pattern connection |
| Notes | Classic 'lookup instead of search' pattern | Free-form observations |
| Field | Example | Purpose |
|---|---|---|
| Review Dates | [2024-11-18, 2024-11-25, 2024-12-10] | Track spaced repetition |
| Review Outcomes | [Solved, Solved with struggle, Solved] | Monitor retention |
| Next Review Due | 2025-01-15 | Automated scheduling |
| Mastery Status | Learning / Familiar / Mastered | High-level progress |
Don't try to capture everything from day one—you'll burn out. Start with: Problem Name, Source, Date, Difficulty, Topics, Outcome, Time, Key Insight. Once the habit is established, gradually add more fields. A simple log you maintain beats a complex log you abandon.
Raw data is only valuable if you can query it effectively. Good organization transforms a list of problems into an analytics engine.
Tags are the backbone of log organization. Use a consistent, hierarchical tagging system:
Data Structure Tags:
Algorithm/Pattern Tags:
Pattern Subtags (more specific):
Company Tags: Google, Amazon, Meta, Apple, Microsoft, etc.
Difficulty Tags: Easy, Medium, Hard
Status Tags: NeedsReview, Mastered, Struggled, RetryNeeded
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
interface ProblemLogEntry { // Core identification id: string; name: string; source: 'LeetCode' | 'HackerRank' | 'CodeForces' | 'Custom'; sourceId: string; url: string; // Classification difficulty: 'Easy' | 'Medium' | 'Hard'; topics: string[]; // ["Array", "Hash Map"] patterns: string[]; // ["Two Pointers", "Sliding Window"] companies: string[]; // ["Google", "Amazon"] // Attempt tracking attempts: Attempt[]; initialAttemptDate: Date; latestAttemptDate: Date; // Learning capture approach: string; // Brief solution approach keyInsight: string; // The "aha" moment timeComplexity: string; spaceComplexity: string; mistakes: string[]; // What went wrong alternativeApproaches: string[]; similarProblems: string[]; // Links to related problems notes: string; // Review status masteryStatus: 'New' | 'Learning' | 'Familiar' | 'Mastered'; confidence: 1 | 2 | 3 | 4 | 5; nextReviewDate: Date | null; reviewHistory: ReviewEntry[];} interface Attempt { date: Date; outcome: 'Solved' | 'Partial' | 'Failed' | 'GaveUp'; timeSpent: number; // Minutes hintsUsed: 'None' | 'TopicHint' | 'ApproachHint' | 'FullSolution'; notes: string;} interface ReviewEntry { date: Date; outcome: 'Easy' | 'Medium' | 'Hard' | 'Failed'; newInterval: number; // Days until next review} // Example entryconst exampleEntry: ProblemLogEntry = { id: "lc-1", name: "Two Sum", source: "LeetCode", sourceId: "1", url: "https://leetcode.com/problems/two-sum/", difficulty: "Easy", topics: ["Array", "Hash Map"], patterns: ["Lookup Instead of Search"], companies: ["Google", "Amazon", "Apple", "Microsoft"], attempts: [ { date: new Date("2024-11-15"), outcome: "Solved", timeSpent: 12, hintsUsed: "None", notes: "Recognized hash map pattern immediately" } ], initialAttemptDate: new Date("2024-11-15"), latestAttemptDate: new Date("2024-11-15"), approach: "Use hash map to store {value: index}. For each element, check if complement (target - current) exists in map.", keyInsight: "Transform 'find two numbers' into 'check if complement exists' - O(n) vs O(n²)", timeComplexity: "O(n)", spaceComplexity: "O(n)", mistakes: [], alternativeApproaches: [ "Two pointers after sorting - O(n log n) time, O(1) space", "Brute force nested loops - O(n²) time, O(1) space" ], similarProblems: ["Two Sum II", "3Sum", "4Sum", "Two Sum Less Than K"], notes: "Foundational problem for 'lookup table' pattern. Many variations exist.", masteryStatus: "Mastered", confidence: 5, nextReviewDate: null, // No further review needed reviewHistory: [ { date: new Date("2024-11-18"), outcome: "Easy", newInterval: 7 }, { date: new Date("2024-11-25"), outcome: "Easy", newInterval: 30 } ]};Once your log is structured, create saved views for common queries:
By Topic: 'Show all Dynamic Programming problems I've attempted'
By Status: 'Show problems where I failed or used hints'
By Time: 'Problems solved this month' or 'Problems not reviewed in 30+ days'
By Company: 'All problems tagged with Google for interview prep'
By Confidence: 'Problems with confidence ≤ 2 that need more practice'
By Pattern Combination: 'Graph + BFS problems' or 'String + DP problems'
Performance Analysis: 'My solve rate by difficulty', 'Average solve time by topic', 'Most common mistake types'
Link related problems together in your 'Similar Problems' field. When you solve '3Sum', link it back to 'Two Sum.' This creates a web of connections that helps you see pattern families. When reviewing before an interview, you can trace entire pattern families through links.
The right tool depends on your preference for simplicity versus power, and whether you want integration with other systems.
Pros: Simple, familiar, no learning curve, powerful filtering and sorting, works offline, easy to share.
Cons: Manual data entry, limited linking capabilities, formulas get complex for advanced analysis.
Best for: Engineers who want minimal setup and don't need complex querying.
1234
| Date | Problem | Source | ID | Difficulty | Topics | Pattern | Time | Outcome | Key Insight | Confidence | Review Due ||------|---------|--------|-----|------------|--------|---------|------|---------|-------------|------------|------------|| 2024-11-15 | Two Sum | LC | 1 | Easy | Array, HashMap | Lookup | 12m | Solved | Complement lookup | 5 | 2024-12-15 || 2024-11-15 | 3Sum | LC | 15 | Medium | Array, Two Pointers | Sorted+2Ptr | 35m | Solved | Skip dupes, sort first | 4 | 2024-12-01 |Pros: Database views, linked entries, templates, rich formatting for notes, built-in formulas, multi-device sync.
Cons: Can be slow with large databases, learning curve for databases, requires internet.
Best for: Engineers who already use Notion and want visual organization with database features.
Pros: Local-first (fast, offline), bidirectional links, graph view for connections, powerful plugins (including spaced repetition), markdown-based.
Cons: Steeper learning curve, requires plugin setup, less visual than Notion.
Best for: Engineers who value local data ownership, enjoy markdown, and want deep customization.
Pros: True database power, complex queries, automation capabilities, API access.
Cons: Overkill for most users, requires more setup, potentially costs money.
Best for: Engineers who want to build custom analytics or integrate with other tools.
| Feature | Spreadsheet | Notion | Obsidian | Custom DB |
|---|---|---|---|---|
| Setup Time | Minutes | Hours | Hours | Days |
| Learning Curve | None | Moderate | Moderate | High |
| Filtering/Sorting | Good | Excellent | Good w/plugins | Excellent |
| Linking Problems | Manual | Built-in | Built-in | Built-in |
| Rich Notes | Limited | Excellent | Excellent | Varies |
| Offline Access | Yes | Limited | Yes | Varies |
| Speed | Fast | Can lag | Fast | Fast |
| Cost | Free | Free/Paid | Free | Usually Paid |
| Analytics | Formulas | Formulas | Plugins | Full SQL |
The most dangerous approach is spending weeks building the 'perfect' system before logging a single problem. Start with a spreadsheet today. After 50+ entries, you'll understand what you actually need and can migrate to a more sophisticated tool—or realize the spreadsheet is fine.
The 'Key Insight' field is the most valuable part of your log—it captures what you'll actually remember and apply. Poor insight capture wastes the log's potential.
A good insight is transferable: it applies beyond this specific problem to a class of problems. Compare:
Weak insight (problem-specific): 'Use a hash map to store values'
Strong insight (transferable): 'When checking if a complement/partner exists for each element, hash map lookup converts O(n²) to O(n)'
The weak version tells you what to do for this problem. The strong version tells you when this approach applies—allowing transfer to Two Sum II, 3Sum, Four Sum, finding pairs with target difference, etc.
Use these templates to structure transferable insights:
Pattern Recognition Template: 'When [problem characteristics], consider [approach] because [reason].'
Example: 'When finding pairs with a target sum in a sorted array, consider two pointers because sorting creates a monotonic relationship where moving left decreases sum and moving right increases it.'
Transformation Template: 'Transform [complex operation] into [simpler operation] by [technique].'
Example: 'Transform O(n) per query range sum into O(1) per query by precomputing prefix sums—trade O(n) preprocessing for O(1) queries.'
Mistake Prevention Template: 'When doing [operation], remember to [consideration] to avoid [error].'
Example: 'When using binary search on rotated arrays, remember that only one half is sorted—must check which before eliminating.'
12345678910111213141516171819202122232425262728293031323334353637
## Problem: Longest Substring Without Repeating Characters (LC #3)**Difficulty**: Medium | **Time**: 22 min | **Outcome**: Solved ### Tags- Pattern: Sliding Window- Topics: String, Hash Set/Map, Two Pointers ### ApproachSliding window with hash set tracking characters in current window.- Expand right pointer, add char to set- If duplicate found, shrink left pointer until char removed- Track max(right - left + 1) ### Key Insight**Sliding window with hash set is the standard pattern for "longest substring satisfying property" problems.** The property (here: uniqueness) determines what data structure tracks the window state. Generalized: When finding longest/shortest substring with some constraint,ask "what data structure encodes whether current window satisfies constraint?" ### Mistakes Made- Initially shrunk one char at a time; realized can jump directly to duplicate position + 1 using hash map<char, index> ### Complexity- Time: O(n) - each character added/removed at most once- Space: O(min(n, alphabet)) - hash set of window characters ### Similar Problems- Minimum Window Substring (shrink optimization)- Longest Substring with At Most K Distinct Characters- Longest Repeating Character Replacement ### NotesThis is the canonical "variable-length sliding window" problem.When the window constraint is violated, shrink until valid.Write your insight immediately after solving, not hours later. The 'aha moment' fades quickly. Even a rough note right away beats a polished note that you'll 'write later' but never do.
A log that sits untouched is just data. Actively using your log multiplies its value.
Set aside 30 minutes each week for log analysis:
Review struggling problems: Filter for problems with low confidence or failed outcomes. Decide: retry now, study prerequisite topic, or shelf for later.
Pattern analysis: Look at problems solved this week. What patterns recur? What connections exist between problems?
Progress check: Compare this week to a month ago. Are you solving harder problems? Faster? With fewer hints?
Gap identification: What topics haven't you practiced recently? Are there patterns you've avoided?
When interviews approach, your log becomes your study guide:
Phase 1 (4-6 weeks before): Identify gaps
Phase 2 (2-4 weeks before): Review and refresh
Phase 3 (1-2 weeks before): Simulate and strengthen
1234567891011121314151617181920212223242526272829303132333435
-- Find weak areas: topics with low solve rateSELECT topic, COUNT(*) as total_problems, SUM(CASE WHEN outcome = 'Solved' THEN 1 ELSE 0 END) as solved, ROUND(100.0 * SUM(CASE WHEN outcome = 'Solved' THEN 1 ELSE 0 END) / COUNT(*), 1) as solve_rateFROM problem_logGROUP BY topicORDER BY solve_rate ASCLIMIT 5; -- Find problems needing review (low confidence, not recently reviewed)SELECT name, topics, confidence, latest_attempt_dateFROM problem_logWHERE confidence <= 3 AND latest_attempt_date < DATE('now', '-14 days')ORDER BY confidence ASC, latest_attempt_date ASC; -- Google-specific Medium/Hard problems I've solvedSELECT name, patterns, key_insight, outcomeFROM problem_logWHERE 'Google' = ANY(companies) AND difficulty IN ('Medium', 'Hard') AND outcome = 'Solved'ORDER BY latest_attempt_date DESC; -- My most common mistakes (for self-awareness before interview)SELECT mistake_pattern, COUNT(*) as frequencyFROM ( SELECT UNNEST(mistakes) as mistake_pattern FROM problem_log) tGROUP BY mistake_patternORDER BY frequency DESCLIMIT 10;Before an interview, pick a core pattern (e.g., 'sliding window') and follow your 'Similar Problems' links from problem to problem. You'll trace the entire pattern family, refreshing your memory of variations and edge cases. This is far more effective than randomly reviewing unconnected problems.
The hardest part of any logging system is consistency over time. Here's how to ensure your log survives the long haul.
Every barrier to logging reduces consistency:
Periodically review your log for quality:
Monthly audit (30 minutes):
Quarterly audit (1 hour):
Common failure modes and solutions:
Too complex → burnout: Simplify. Cut fields. Better to log 5 fields consistently than 20 fields sometimes.
No visible benefit → motivation loss: Run an analysis. Show yourself the value. 'You've logged 100 problems; your Medium solve rate improved from 40% to 70%.'
Falling behind → overwhelm: Declare bankruptcy. It's okay to miss entries. Resume logging for new problems rather than trying to backfill months of history.
Changing tools → fragmentation: Export before switching. Don't split your log across tools without consolidation.
Two years from now, you'll be preparing for a senior engineering interview. Your problem log will have 300+ problems with structured insights, pattern connections, and historical performance data. That's not just a list—it's a personal DSA textbook written from your own experience, tailored to your learning style, and covering exactly the problems you've struggled with and mastered. No generic study guide can match it.
A problem log transforms chaotic practice into structured intelligence. It preserves insights, reveals patterns, tracks progress, and becomes an irreplaceable resource for interview preparation.
Choose a tool (5 minutes): Google Sheets if you want simple; Notion if you want power. Don't overthink.
Create your template (5 minutes): Copy the essential fields from this page. Date, Problem, Source, Difficulty, Topics, Time, Outcome, Key Insight.
Log your next problem (5 minutes): Start with a problem you solved recently. Fill in what you remember. Imperfect is fine.
You now have a problem log. Tomorrow, log another. Next week, log five. In six months, you'll have 100+ entries and wonder how you ever practiced without it.
Don't wait for the perfect system. Create a simple log right now—before you close this page. Log your most recent problem from memory. That single entry makes you 'someone who keeps a problem log.' The identity shift matters more than the tool.