Skip to content

Welcome to our collaborative journey to conquer the coding interview realm! 🌐 In this repository, I've gathered the top 150 interview questions sourced from the best of GitHub. Are you interested in challenging your capability and grow together? join me!

License

Notifications You must be signed in to change notification settings

muhit-khan/LeetCode-Top-Interview-150

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Leetcode Top Interview 150

C++ Java Python JavaScript vscode

Welcome to the LeetCode Top Interview 150 project. This repository contains Top 150 Interview Problems from LeetCode and solutions source code in C++/ Java/ JavaScript/ Python Programming languages.The goal is to provide comprehensive, well-documented solutions to aid in understanding these common interview problems.

Interested in collaboration?

I encourage collaboration and invite others to join in this endeavor. Here's how you can contribute:

Fork the Repository

  1. Fork the repository by clicking on the 'Fork' button on the top right corner of this page. This will create a copy of this repository on your GitHub account.

Clone the Repository

git clone https://github.com/muhit-khan/LeetCode-Top-Interview-150.git

Create a Branch

git checkout -b new-contributions

Add your Solutions

  1. Solve a problem from the LeetCode Top 150 Interview Questions.
  2. Add your solution to the respective problem directory.
  3. Ensure your code is well-documented and easy to understand.

Commit Changes

git commit -m "Add solution for Problem Down below"

Push to the Branch

git push origin new-contributions

Open a Pull Request

  1. Go to your repository on GitHub.
  2. Click on the 'New Pull Request' button.
  3. Provide a descriptive title and overview of your changes.
  4. Submit the Pull Request.

[NB: Maintain a consistent code style to ensure readability. Use descriptive variable and function names. Comment your code to explain the approach and any intricate parts.]

Wanna get connected?

Feel free to open an issue to start a discussion or ask questions. You can reach out to me via:

Let's ace those LeetCode problems together!

Happy Coding! πŸš€

Questions List Progress bar

Problem Difficulty Signal Status Solution
Array / String
Merge Sorted Array Easy 🟒
Remove Element Easy 🟒
Remove Duplicates from Sorted Array Easy 🟒
Remove Duplicates from Sorted Array II Medium 🟑
Majority Element Easy 🟒
Rotate Array Medium 🟑
Best Time to Buy and Sell Stock Easy 🟒
Best Time to Buy and Sell Stock II Medium 🟑
Jump Game Medium 🟑
Jump Game II Medium 🟑
H-Index Medium 🟑
Insert Delete GetRandom O(1) Medium 🟑
Product of Array Except Self Medium 🟑
Gas Station Medium 🟑
Candy Hard πŸ”΄
Trapping Rain Water Hard πŸ”΄
Roman to Integer Easy 🟒
Integer to Roman Medium 🟑
Length of Last Word Easy 🟒
Longest Common Prefix Easy 🟒
Reverse Words in a String Medium 🟑
Zigzag Conversion Medium 🟑
Find the Index of the First Occurrence in a String Easy 🟒
Text Justification Hard πŸ”΄
Two Pointers
Valid Palindrome Easy 🟒
Is Subsequence Easy 🟒
Two Sum II - Input Array Is Sorted Medium 🟑
Container With Most Water Medium 🟑
3Sum Medium 🟑
Sliding Window
Minimum Size Subarray Sum Medium 🟑
Longest Substring Without Repeating Characters Medium 🟑
Substring with Concatenation of All Words Hard πŸ”΄
Minimum Window Substring Hard πŸ”΄
Matrix
Valid Sudoku Medium 🟑
Spiral Matrix Medium 🟑
Rotate Image Medium 🟑
Set Matrix Zeroes Medium 🟑
Game of Life Medium 🟑
Hashmap
Ransom Note Easy 🟒
Isomorphic Strings Easy 🟒
Word Pattern Easy 🟒
Valid Anagram Easy 🟒
Group Anagrams Medium 🟑
Two Sum Easy 🟒
Happy Number Easy 🟒
Contains Duplicate II Easy 🟒
Longest Consecutive Sequence Medium 🟑
Intervals
Summary Ranges Easy 🟒
Merge Intervals Medium 🟑
Insert Interval Medium 🟑
Minimum Number of Arrows to Burst Balloons Medium 🟑
Stack
Valid Parentheses Easy 🟒
Simplify Path Medium 🟑
Min Stack Medium 🟑
Evaluate Reverse Polish Notation Medium 🟑
Basic Calculator Hard πŸ”΄
Linked List
Linked List Cycle Easy 🟒
Add Two Numbers Medium 🟑
Merge Two Sorted Lists Easy 🟒
Copy List with Random Pointer Medium 🟑
Reverse Linked List II Medium 🟑
Reverse Nodes in k-Group Hard πŸ”΄
Remove Nth Node From End of List Medium 🟑
Remove Duplicates from Sorted List II Medium 🟑
Rotate List Medium 🟑
Partition List Medium 🟑
LRU Cache Medium 🟑
Binary Tree General
Maximum Depth of Binary Tree Easy 🟒
Same Tree Easy 🟒
Invert Binary Tree Easy 🟒
Symmetric Tree Easy 🟒
Construct Binary Tree from Preorder and Inorder Traversal Medium 🟑
Construct Binary Tree from Inorder and Postorder Traversal Medium 🟑
Populating Next Right Pointers in Each Node II Medium 🟑
Flatten Binary Tree to Linked List Medium 🟑
Path Sum Easy 🟒
Sum Root to Leaf Numbers Medium 🟑
Binary Tree Maximum Path Sum Hard πŸ”΄
Binary Search Tree Iterator Medium 🟑
Count Complete Tree Nodes Easy 🟒
Binary Tree BFS
Binary Tree Right Side View Medium 🟑
Average of Levels in Binary Tree Easy 🟒
Binary Tree Level Order Traversal Medium 🟑
Binary Tree Zigzag Level Order Traversal Medium 🟑
Binary Search Tree
Minimum Absolute Difference in BST Easy 🟒
Kth Smallest Element in a BST Medium 🟑
Validate Binary Search Tree Medium 🟑
Graph General
Number of Islands Medium 🟑
Surrounded Regions Medium 🟑
Clone Graph Medium 🟑
Evaluate Division Medium 🟑
Course Schedule Medium 🟑
Course Schedule II Medium 🟑
Graph BFS
Snakes and Ladders Medium 🟑
Minimum Genetic Mutation Medium 🟑
Word Ladder Hard πŸ”΄
Trie
Implement Trie (Prefix Tree) Medium 🟑
Design Add and Search Words Data Structure Medium 🟑
Word Search II Hard πŸ”΄
Backtracking
Letter Combinations of a Phone Number Medium 🟑
Combinations Medium 🟑
Permutations Medium 🟑
Combination Sum Medium 🟑
N-Queens II Hard πŸ”΄
Generate Parentheses Medium 🟑
Word Search Medium 🟑
Divide & Conquer
Convert Sorted Array to Binary Search Tree Easy 🟒
Sort List Medium 🟑
Construct Quad Tree Medium 🟑
Merge k Sorted Lists Hard πŸ”΄
Kadane's Algorithm
Maximum Subarray Medium 🟑
Maximum Sum Circular Subarray Medium 🟑
Binary Search
Search Insert Position Easy 🟒
Search a 2D Matrix Medium 🟑
Find Peak Element Medium 🟑
Search in Rotated Sorted Array Medium 🟑
Find First and Last Position of Element in Sorted Array Medium 🟑
Find Minimum in Rotated Sorted Array Medium 🟑
Median of Two Sorted Arrays Hard πŸ”΄
Heap
Kth Largest Element in an Array Medium 🟑
IPO Hard πŸ”΄
Find K Pairs with Smallest Sums Medium 🟑
Find Median from Data Stream Hard πŸ”΄
Bit Manipulation
Add Binary Easy 🟒
Reverse Bits Easy 🟒
Number of 1 Bits Easy 🟒
Single Number Easy 🟒
Single Number II Medium 🟑
Bitwise AND of Numbers Range Medium 🟑
Math
Palindrome Number Easy 🟒
Plus One Easy 🟒
Factorial Trailing Zeroes Medium 🟑
Sqrt(x) Easy 🟒
Pow(x, n) Medium 🟑
Max Points on a Line Hard πŸ”΄
1D DP
Climbing Stairs Easy 🟒
House Robber Medium 🟑
Word Break Medium 🟑
Coin Change Medium 🟑
Longest Increasing Subsequence Medium 🟑
Multidimensional DP
Triangle Medium 🟑
Minimum Path Sum Medium 🟑
Unique Paths II Medium 🟑
Longest Palindromic Substring Medium 🟑
Interleaving String Medium 🟑
Edit Distance Medium 🟑
Best Time to Buy and Sell Stock III Hard πŸ”΄
Best Time to Buy and Sell Stock IV Hard πŸ”΄
Maximal Square Medium 🟑

License

This project is licensed under the MIT License.

About

Welcome to our collaborative journey to conquer the coding interview realm! 🌐 In this repository, I've gathered the top 150 interview questions sourced from the best of GitHub. Are you interested in challenging your capability and grow together? join me!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published