An open API service indexing awesome lists of open source software.

https://github.com/francesco-s/leetcodes

LeetCode problems solved in Python. Each solution is well-tested and easy to execute (WIP).
https://github.com/francesco-s/leetcodes

competitive-programming data-structures problem-solving

Last synced: about 8 hours ago
JSON representation

LeetCode problems solved in Python. Each solution is well-tested and easy to execute (WIP).

Awesome Lists containing this project

README

          

# LeetCode Practice Repository

A comprehensive collection of LeetCode solutions organized by data structures and algorithms topics for systematic coding interview preparation.

## Repository Structure

### DSA (Data Structures & Algorithms)

The core of this repository contains solutions organized by fundamental CS concepts:

- **ArrayStrings** - Array manipulation and string processing problems
- **Backtracking** - Recursive exploration and constraint satisfaction problems
- **BinarySearch** - Efficient searching algorithms and variants
- **Greedy** - Optimization problems using greedy approach
- **hashing** - Hash table/map based solutions
- **Heaps** - Priority queue and heap-based problems
- **LinkedList** - Singly/doubly linked list operations
- **StacksQueues** - LIFO/FIFO data structure problems
- **TreeGraph** - Binary trees, BSTs, and graph algorithms

### Notebook

Interactive Jupyter notebooks for analysis and learning:

- `GenericQuestions.ipynb` - Common coding patterns and templates
- `LeetCode_path_weekly_topics.ipynb` - Weekly study plan and progress tracking

### Notes

Study materials and references:

- `which_DS.md` - Guide for choosing the right data structure for problems

## Getting Started

1. **Clone the repository:**

```bash
git clone https://github.com/francesco-s/leetcodes.git
cd leetcodes
```

2. **Navigate to specific topics:**

```bash
cd DSA/ArrayStrings # Example: work on array problems
```

3. **Use notebooks for interactive study:**
```bash
jupyter notebook notebook/GenericQuestions.ipynb
```

## Study Approach

### Recommended Study Path

1. Start with **ArrayStrings** and **hashing** for fundamentals
2. Progress to **LinkedList** and **StacksQueues** for basic data structures
3. Advance to **BinarySearch** and **Greedy** for algorithmic thinking
4. Tackle **TreeGraph** and **Heaps** for complex data structures
5. Master **Backtracking** for advanced problem-solving

### Weekly Practice Plan

- Use `LeetCode_path_weekly_topics.ipynb` to track your progress
- Aim for 3-5 problems per topic before moving on
- Review `which_DS.md` when choosing approaches for new problems

## Usage Tips

- **File Naming Convention**: Use descriptive names like `1.TwoSum.py`
- **Comments**: Include time/space complexity analysis in solution comments
- **Multiple Solutions**: Keep different approaches in the same file with clear separators
- **Test Cases**: Add example inputs/outputs for quick verification

## Contributing

Feel free to:

- Add new solutions and optimizations
- Improve existing code with better approaches
- Update documentation and study notes
- Share insights in the notebooks

## Resources

- [LeetCode](https://leetcode.com/) - Practice platform
- [NeetCode](https://neetcode.io/) - Curated problem lists
- [GeeksforGeeks](https://www.geeksforgeeks.org/) - Algorithm explanations