| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Welcome to the Leetcode 250 repository – a curated collection of the 250 most frequently asked Leetcode questions with clean Python solutions, detailed explanations, and optimized code — ideal for preparing for FAANG, Big Tech, and startup coding interviews.
✅ If you’re searching for:
Leetcode 250 · Top 250 Leetcode Problems · FAANG Coding Prep · Python Interview Questions
Most Asked Leetcode Questions · Leetcode DSA Sheet · Leetcode for Big Tech Interviews
Data Structures and Algorithms in Python · Top Leetcode List 2024 · Best Leetcode Questions to Practice
Leetcode Pattern-Based Practice · Python Coding Interview Guide · Google Amazon Meta Interview Leetcode
Top DSA Problems for Product Based Companies · Coding Round Preparation in Python
Neetcode 150 vs Leetcode 250 · Leetcode Python Tracker · Crack the Coding Interview with LeetcodeYou’ve landed in the right place.
✔️ 250 curated questions to maximize your DSA preparation
✔️ Clean and readable Python solutions
✔️ Includes intuition, approach, time/space complexity
✔️ Structured by topic for ease of learning
✔️ Suitable for Google, Amazon, Meta, Microsoft, Netflix
✔️ Regular updates and daily commit logs
✔️ Easy folder navigation and problem search
| 💡 Topic | 📌 Folder Name | 📊 Problem Count |
|---|---|---|
| Arrays & Strings | arrays_strings/ | ~40 problems |
| Linked Lists | linked_lists/ | ~20 problems |
| Trees & Binary Trees | trees/ | ~35 problems |
| Graphs & Traversals | graphs/ | ~25 problems |
| Dynamic Programming | dp/ | ~40 problems |
| Sliding Window | sliding_window/ | ~20 problems |
| Binary Search | binary_search/ | ~15 problems |
| Backtracking | backtracking/ | ~20 problems |
| Stack & Queues | stack_queue/ | ~15 problems |
| Heap & Greedy | heap_greedy/ | ~15 problems |
| Bit Manipulation | bit_manipulation/ | ~10 problems |
| Math & Logic | math_logic/ | ~10 problems |
| Others & Miscellaneous | others/ | ~5 problems |
📖 Detailed topic guide: See TOPICS.md for comprehensive explanations of each category.
📊 Progress Tracker
✅ Total Questions: 250
🔄 Solved: XX
📅 Updates: Daily commits
🎯 Track your progress: Run python progress_tracker.py to monitor your completion status across all categories.
⭐ Stars, forks, and contributions are welcome!
⭐ Support & Share
If this project helps you:
🌟 Give it a star
🍴 Fork it to your profile
🗣️ Share with friends and aspiring interview candidates
"""
Problem: 121. Best Time to Buy and Sell Stock
Link: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
Level: Easy
Approach:
- Track the minimum price seen so far
- Track the maximum profit if sold today
Time Complexity: O(n)
Space Complexity: O(1)
"""
def maxProfit(prices):
min_price = float('inf')
max_profit = 0
for p in prices:
min_price = min(min_price, p)
max_profit = max(max_profit, p - min_price)
return max_profit| Back | FazBrowse Home | New Git URL |