Skip to content

buntylm/Common-Coding-Interview-Approaches

Repository files navigation

Common Coding Interview Approaches

A curated collection of coding interview problem-solving techniques with explanations, examples, and Swift implementations. The goal is to start from brute force (baseline correctness) and progressively optimize using common patterns, while tracking personal learning progress.

🎯 Purpose

  • 📚 Learn: Understand the most common coding approaches used in interviews.
  • 🛠 Practice: Solve problems in Swift (and possibly other languages in the future).
  • 🚀 Optimize: Move from brute force → efficient solutions step-by-step.
  • 🤝 Share: Help other developers prepare for technical interviews.

📜 Approaches Covered (Planned)

# Approach Status
1 Brute Force Baseline
2 Two Pointers
3 Sliding Window
4 Prefix Sum / Difference Array
5 Hashing / Frequency Map
6 Binary Search (Value/Answer) ⏳ Coming Soon
7 Sorting + Greedy ⏳ Coming Soon
8 Stack / Monotonic Stack ⏳ Coming Soon
9 Heap / Priority Queue ⏳ Coming Soon
10 Union-Find (Disjoint Set) ⏳ Coming Soon
11 BFS / DFS ⏳ Coming Soon
12 Backtracking ⏳ Coming Soon
13 Dynamic Programming ⏳ Coming Soon
14 Graph Shortest Paths ⏳ Coming Soon
15 Topological Sort ⏳ Coming Soon
16 Interval Sweep Line ⏳ Coming Soon
17 Trie ⏳ Coming Soon
18 Bit Manipulation ⏳ Coming Soon

🛠 Example Folder Structure

Common-Coding-Interview-Approaches/
│
├── 01-Brute-Force/
│   ├── README.md      # Explanation & problems
│   ├── MaxSubarraySum.swift
│   ├── TwoSum.swift
│
├── 02-Two-Pointers/
│   ├── ...
│
├── 03-Sliding-Window/
│   ├── ...
│
└── ...

🧠 Learning Path

  1. Start with Brute Force to ensure correctness.
  2. Recognize patterns that allow optimization.
  3. Implement the optimized version.
  4. Compare complexity and verify results with brute force.
  5. Move to the next approach.

🤝 Contributing

Contributions are welcome! If you want to add:

  • A new approach
  • Example problems
  • Optimized solutions Please fork the repo, make changes, and submit a PR.

📜 License

MIT License — feel free to use, modify, and share.

Happy coding and interview prep! 🚀

About

Collection of coding interview problem-solving techniques

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages