This repository contains a curated collection of Python solutions to common data structure and algorithm problems, frequently asked in technical interviews at top tech companies.
MAMAA stands for:
- Meta
- Apple
- Microsoft
- Amazon
- Alphabet
This project is inspired by repositories like neerazz/FAANG.
Tech interviews are evolving, but the fundamentals remain the same. The problems here are the backbone of interviews at companies like Meta, Apple, Microsoft, Amazon, Alphabet, and more. Mastering these will prepare you for both traditional and modern interview formats.
- Complexities & Big O Explained
- Resources & Training Material
- Data Structures & Algorithm Problems
- Contests
- System Design
- OOPS Design
- Important Links
- How to Use This Repo
- How to Contribute
- When to Contribute
- How to Set Up This Repository
Understanding time and space complexity is crucial for writing efficient code and acing interviews. Here’s a high-level overview:
| Complexity | Big O | Examples |
|---|---|---|
| Constant | O(1) | Hash table lookup, Accessing array element |
| Logarithmic | O(log n) | Binary search, Searching in sorted array |
| Linearithmic | O(n log n) | Merge sort, Heap sort |
| Quadratic | O(n^2) | Bubble sort, Selection sort |
| Cubic | O(n^3) | Floyd-Warshall, 3-nested loops |
| Factorial | O(n!) | Traveling Salesman, permutations |
Further Reading:
Explore curated resources for mastering Data Structures, Algorithms, System Design, and Object-Oriented Programming.
Explore by Topic: (TBD)
Sharpen your skills and benchmark yourself with real contest problems:
- Design Library Management System
- Design Parking Lot
- Design Call Center
- Design Hit Counter
- Design Linux Find Command
- Design ATM
- Design Movie Ticket System
- Design Pharmacy Shop
- Browse by topic or company to find relevant problems.
- Read the code and comments for intuition and step-by-step logic.
- Practice by re-implementing solutions and timing yourself.
- Use the resources to fill knowledge gaps.
- Try contest problems for real-world speed and pressure.
- Fork the repository.
- Do the desired changes (add/delete/modify).
- Make a pull request.
- If there is no solution to a problem.
- If your solution is asymptotically faster than the one in the main branch.
- If your algorithm is of the same time complexity but with reduced code size, comment out the original solution and make a pull request with your solution.
-
Clone the repository:
git clone https://github.com/neerazz/MAMAA.git
-
Install dependencies:
pip install -r requirements.txt
-
Navigate to a topic folder and explore the solutions. Each
.pyfile is a self-contained solution to a problem. -
Run the code to test it:
python ./Arrays/two_sum.py
This project is licensed under the MIT License.