Getting Started with DS-Algo Practice

🎯 For Best Obsidian Experience

Install the VS Code Editor plugin for syntax highlighting:

  1. Obsidian Settings β†’ Community Plugins β†’ Browse
  2. Search β€œVS Code Editor” β†’ Install & Enable
  3. Java files now open with full syntax highlighting in Obsidian!

Plugin URL: obsidian://show-plugin?id=vscode-editor


βœ… Setup Complete!

Your DS-Algo practice environment is ready with:

  • 4 Core Patterns with industry use cases
  • 17 LeetCode Problems with 30+ solutions
  • Multiple approaches showing time/space tradeoffs
  • Real-world context for motivation

🎯 Quick Start (3 Steps)

Step 1: Pick Your Focus

Check PRACTICE_INDEX.md and choose:

  • By Pattern: Two Pointers, Sliding Window, Binary Search, HashMap
  • By Difficulty: Easy β†’ Medium β†’ Hard
  • By Industry Application: Backend, Data Engineering, Distributed Systems

Step 2: Learn the Pattern

Read pattern file in src/patterns/:

# Review Two Pointers pattern
cat src/patterns/TwoPointers.java
 
# Run examples
javac src/patterns/TwoPointers.java && java -cp src patterns.TwoPointers

What you’ll learn:

  • When to use this pattern
  • Industry applications (why it matters)
  • Multiple working examples
  • Time & space complexity

Step 3: Practice Problems

Open the practice session in practice-sessions/:

# View Two Pointers practice session
cat practice-sessions/Session-01-TwoPointers.md

What you’ll get:

  • LeetCode problem links
  • Quick problem summaries
  • Multiple solution approaches
  • Detailed complexity analysis
  • Common pitfalls & tips

Week 1: Array Mastery

Mon-Tue: Two Pointers (Session 1)

  • Container With Most Water
  • 3Sum
  • Trapping Rain Water

Wed-Thu: Sliding Window (Session 2)

  • Minimum Size Subarray Sum
  • Longest Repeating Character
  • Permutation in String

Fri: Mixed practice
Weekend: Review and harder variations

Week 2: Search & Lookup

Mon-Tue: Binary Search (Session 3)

  • Find Peak Element
  • Koko Eating Bananas
  • Time-Based Key-Value Store

Wed-Thu: HashMap (Session 4)

  • Top K Frequent Elements
  • Design HashMap
  • LRU Cache

Fri: Mixed practice
Weekend: Mock interview practice

πŸš€ Using the Files

For Learning

  1. README.md - Overview
  2. QUICK_REFERENCE.md - Pattern recognition cheat sheet
  3. Pattern files (src/patterns/) - Detailed implementations

For Practice

  1. PRACTICE_INDEX.md - Find problems
  2. Practice sessions (practice-sessions/) - Detailed solutions
  3. Try solving before looking at solutions!

For Reference

  • CLAUDE_INSTRUCTIONS.md - How to add new content
  • QUICK_REFERENCE.md - Complexity guide, common pitfalls

πŸŽ“ Study Tips

Before Solving

  1. Read problem carefully (2-3 times)
  2. Ask: What pattern is this?
  3. Discuss brute force approach
  4. Think about optimization

While Solving

  1. Start with working solution (correctness first)
  2. Test with examples
  3. Think about edge cases
  4. Analyze complexity

After Solving

  1. Compare with provided solutions
  2. Understand tradeoffs
  3. Can you do better?
  4. Practice explaining your approach

πŸ”₯ Industry Motivation

Each pattern includes real-world applications:

Two Pointers

  • Database merge joins
  • TCP packet sequencing
  • Load balancer algorithms

Sliding Window

  • API rate limiting
  • Real-time analytics
  • Video streaming buffers

Binary Search

  • Database indexing (B-trees)
  • Git bisect (finding bugs)
  • Capacity planning

HashMap

  • Caching (Redis, Memcached)
  • Session management
  • Deduplication pipelines

βš™οΈ Java Version Notes

Java 17: All code is Java 17 compatible by default

Java 21+: Features marked with // Java 21+ include:

  • Pattern matching for switch
  • Record patterns
  • Virtual threads
  • Unnamed patterns

Check your Java version:

java -version

πŸƒ Run Examples

# Navigate to folder
cd "/Users/niladri.roy/Learn/System Design/DS-Algo-Practice"
 
# Compile and run any pattern
javac src/patterns/TwoPointers.java
java -cp src patterns.TwoPointers
 
# Or compile all at once
javac src/patterns/*.java

πŸ“ Track Your Progress

Create a simple log:

2026-04-09 | Container With Water | βœ… Solved | 20min | Two Pointers
2026-04-09 | 3Sum               | ❌ Needed hint | 35min | Two Pointers
2026-04-10 | Min Window         | βœ… Solved | 30min | Sliding Window

🎯 Next Steps

  1. Today: Read QUICK_REFERENCE.md for pattern recognition
  2. This Week: Complete Session 1 (Two Pointers)
  3. This Month: Cover all 4 foundational patterns
  4. Ongoing: Build to 100+ problems

πŸ’‘ Remember

β€œThe goal isn’t to memorize solutions, but to recognize patterns and understand tradeoffs!”

  • Every problem has multiple solutions
  • Space vs Time is always a tradeoff
  • Real interviews focus on thinking process
  • Industry context helps motivation

πŸ†˜ Need Help?

  • Check QUICK_REFERENCE.md for pattern recognition
  • Review PRACTICE_INDEX.md for problem organization
  • Look at pattern files for conceptual understanding
  • Study practice sessions for detailed solutions

Ready to start? Pick a session from PRACTICE_INDEX.md! πŸš€