Skip to content

This repository offers Java-based solutions to the Top 150 LeetCode Interview Questions, covering diverse topics like arrays, linked lists, stacks, and more. Organized for efficient learning, it includes problem details, progress tracking, and structured solutions to enhance coding interview preparation.

Notifications You must be signed in to change notification settings

hiteshmahto/Leetcode-Top-Interview-150

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Leetcode Top Interview 150 Java

This repository contains leetcode Top 150 Interview Problems solutions source code in Java Programming languages.

Questions List Progress bar

Problem Difficulty Solution Status
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

Contact

For any queries or suggestions:

Email: hiteshmahto786@gmail.com

LinkedIn: Hitesh Mahto's LinkedIn Profile

About

This repository offers Java-based solutions to the Top 150 LeetCode Interview Questions, covering diverse topics like arrays, linked lists, stacks, and more. Organized for efficient learning, it includes problem details, progress tracking, and structured solutions to enhance coding interview preparation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published