Skip to content

pedro-cons/roadmap-leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 

Repository files navigation

Welcome to My Data Structures & Algorithms Collection!

This repository is dedicated to helping you master the essential data structures and algorithms that are crucial for technical interviews, particularly in the context of coding challenges and competitive programming. Whether you're preparing for your next job interview or looking to level up your problem-solving skills, you'll find a collection of the most commonly asked problems along with effective learning resources.

πŸ” What You'll Find Here:

  • Detailed Problem Solutions: A comprehensive list of LeetCode problems organized by category and difficulty to help you build your skills step by step.
  • Algorithms & Data Structures: Explore topics like Arrays, Hashing, Two Pointers, Sliding Window, Linked Lists, Trees, Stacks, Binary Search, and more!
  • Helpful Resources: Direct links to tutorials, explanations, and articles to deepen your understanding of each topic, accompanied by problem sets that are frequently asked in interviews.

πŸ’‘ Key Topics Covered:

  • Arrays & Hashing: Master the building blocks for many problems involving sequence and uniqueness.
  • Two Pointers: Learn the technique used to optimize problems involving linear data structures.
  • Sliding Window: Solve problems related to subarrays and subsequences efficiently.
  • Stacks: Understand how to handle problems that require Last-In-First-Out (LIFO) access.
  • Linked Lists: Dive deep into data structures that allow dynamic data storage and manipulation.
  • Binary Search: Improve your ability to search in sorted data with logarithmic time complexity.
  • Trees: Build a strong foundation in binary trees, binary search trees, and tree traversal algorithms.

Whether you're a beginner looking to get started with coding challenges or an experienced developer aiming to polish your interview prep, this collection is here to support your journey. Happy coding!

πŸ“š Learning Resources for Data Structures and Algorithms

Here are some useful resources to help you understand the essential data structures and algorithms that frequently appear in technical interviews. Each section links to tutorials and articles for deeper learning.

πŸ”’ Arrays & Hashing

πŸ‘£ Two Pointers

πŸ—οΈ Stack

πŸ” Binary Search

πŸͺŸ Sliding Window

πŸ”— Linked List

🌳 Trees

Important additional links:

Exercises to practice

πŸ”’ Arrays & Hashing

Arrays and hashing are core topics in technical interviews. This section includes some of the most frequently asked LeetCode problems, helping you recognize patterns and build efficient solutions using arrays, hash sets, and hash maps.

🧩 Problem βš™οΈ Difficulty πŸ”— Link
Contains Duplicate Easy Link
Valid Anagram Easy Link
Two Sum Easy Link
Group Anagrams Medium Link
Top K Frequent Elements Medium Link
Encode and Decode Strings Medium Link
Product of Array Except Self Medium Link
Valid Sudoku Medium Link
Longest Consecutive Sequence Hard Link
Intersection of Two Arrays Easy Link
Contains Duplicate II Easy Link
Set Matrix Zeroes Medium Link
Spiral Matrix Medium Link
3Sum Medium Link
4Sum Medium Link
Subarray Sum Equals K Medium Link
Sliding Window Maximum Hard Link
Minimum Window Substring Hard Link
Longest Substring Without Repeating Characters Medium Link

πŸ‘£ Two Pointers

The Two Pointers technique is widely used to optimize algorithms, especially in array, string, and linked list problems. Many technical interviews test this pattern to evaluate your problem-solving and algorithmic skills.

🧩 Problem βš™οΈ Difficulty πŸ”— Link
Reverse String Easy Link
Valid Palindrome Easy Link
Remove Duplicates from Sorted Array Easy Link
Move Zeroes Easy Link
Two Sum II - Input Array Is Sorted Easy Link
Merge Sorted Array Easy Link
Linked List Cycle Easy Link
3Sum Medium Link
Container With Most Water Medium Link
Sort Colors Medium Link
Remove Nth Node From End of List Medium Link
Partition List Medium Link
Trapping Rain Water Hard Link
Sliding Window Maximum Hard Link
Palindrome Linked List Hard Link

πŸ—οΈ Stack

Stacks are a fundamental data structure used to solve problems involving reverse order, nested structures, and backtracking. This section includes some of the most common LeetCode problems involving stacks, which are frequently asked in technical interviews.

🧩 Problem βš™οΈ Difficulty πŸ”— Link
Valid Parentheses Easy Link
Min Stack Easy Link
Next Greater Element I Easy Link
Daily Temperatures Medium Link
Generate Parentheses Medium Link
Car Fleet Medium Link
Remove Duplicate Letters Medium Link
Asteroid Collision Medium Link
Valid Parenthesis String Medium Link
Maximal Rectangle Hard Link
Largest Rectangle In Histogram Hard Link
Minimum Remove to Make Valid Parentheses Medium Link
Flatten Nested List Iterator Medium Link
Palindrome Linked List Easy Link
Reverse Substrings Between Each Pair of Parentheses Medium Link

πŸ” Binary Search

Binary Search is one of the most important algorithms to master, often used to optimize searching problems. This section includes a collection of LeetCode problems involving binary search, many of which are frequently asked in technical interviews at top companies.

🧩 Problem βš™οΈ Difficulty πŸ”— Link
Binary Search Easy Link
Search Insert Position Easy Link
First Bad Version Easy Link
Search a 2D Matrix Medium Link
Koko Eating Bananas Medium Link
Find Minimum In Rotated Sorted Array Medium Link
Search In Rotated Sorted Array Medium Link
Find Peak Element Medium Link
Perfect Squares Medium Link
Find the Duplicate Number Medium Link
Sqrt(x) Easy Link
Time Based Key-Value Store Hard Link
Median of Two Sorted Arrays Hard Link
Count of Smaller Numbers After Self Hard Link
Split Array Largest Sum Hard Link

πŸͺŸ Sliding Window

Sliding Window is a key technique for solving problems that involve searching for subarrays or substrings. It allows for optimizing problems that require traversing contiguous parts of a list or string efficiently. This section includes the most common LeetCode problems using this technique, frequently asked in technical interviews.

🧩 Problem βš™οΈ Difficulty πŸ”— Link
Best Time to Buy and Sell Stock Easy Link
Permutation In String Medium Link
Fruit Into Baskets Medium Link
Sliding Window Maximum Hard Link
Longest Repeating Character Replacement Medium Link
Minimum Window Substring Hard Link
Maximum Sum Subarray of Size K Medium Link
Subarray Product Less Than K Medium Link
Count Number of Nice Subarrays Medium Link
Number of Substrings Containing All Three Characters Medium Link
Subarrays of Size K with Average Greater than or Equal to Threshold Medium Link
Replace the Substring for Balanced String Medium Link

πŸ”— Linked List

Linked Lists are fundamental data structures used to store sequences of elements. This section includes LeetCode problems involving Linked Lists, which frequently appear in technical interviews. Mastering these problems will help you understand how to manipulate pointers and build efficient solutions.

🧩 Problem βš™οΈ Difficulty πŸ”— Link
Reverse Linked List Easy Link
Linked List Cycle Easy Link
Merge Two Sorted Lists Easy Link
Intersection of Two Linked Lists Easy Link
Remove Nth Node From End of List Medium Link
Reorder List Medium Link
Add Two Numbers Medium Link
Find the Duplicate Number Medium Link
Palindrome Linked List Medium Link
Flatten a Linked List Medium Link
Copy List With Random Pointer Medium Link
LRU Cache Hard Link
Linked List Cycle II Hard Link
Swap Nodes in Pairs Medium Link

🌳 Trees

Trees are a crucial concept in computer science, often used to represent hierarchical data structures. This section includes common LeetCode problems related to binary trees, binary search trees, and tree traversal, which are frequently asked in technical interviews.

🧩 Problem βš™οΈ Difficulty πŸ”— Link
Maximum Depth of Binary Tree Easy Link
Same Tree Easy Link
Invert Binary Tree Easy Link
Balanced Binary Tree Easy Link
Diameter of Binary Tree Medium Link
Lowest Common Ancestor of a Binary Search Tree Medium Link
Subtree of Another Tree Medium Link
Binary Tree Level Order Traversal Medium Link
Path Sum Medium Link
Convert Sorted Array to Binary Search Tree Medium Link
Kth Smallest Element in a BST Medium Link
Validate Binary Search Tree Hard Link
Serialize and Deserialize Binary Tree Hard Link

About

Roadmap of LeetCode problems focused on technical interviews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published