Leetcode Top 100 Problems With Solutions

The top 100 LeetCode problems are some of the most frequently asked in software engineering interviews. This page provides solutions and explanations for all 100 problems, along with detailed explanations of the algorithms and data structures used. Whether you're a beginner or an experienced engineer, this page is a valuable resource for preparing for your next interview.


View Problems

Top 100 Leetcode Problems With Solutions

Easy

  • Two Sum
  • Roman To Integer
  • Longest Common Prefix
  • Valid Parenthesis
  • Merge Two Sorted Lists
  • Search Insert Position
  • Climbing Stairs
  • Binary Tree Inorder Traversal
  • Symmetric Tree
  • Maximum Depth Of A Binary Tree
  • Pascal's Triangle
  • Best Time To Buy And Sell Stock
  • Single Number
  • Linked List Cycle
  • Intersection Of Two Linked Lists
  • Majority Element
  • Reverse Linked List
  • Invert Binary Tree
  • Palindrome Linked List
  • Move Zeroes
  • Diameter Of Binary Tree
  • Binary Search

Medium

  • Add Two Numbers
  • Longest Substring Without Repeating Characters
  • Longest Palindromic Substring
  • Container With Most Water
  • 3Sum
  • Letter Combinations Of A Phone Number
  • Remove Nth Node From End Of List
  • Generate Parenthesis
  • Swap Nodes In Pair
  • Next Permutation
  • Search In Rotated Sorted Array
  • Find First And Last Position Of Element In Sorted Array
  • Combination Sum
  • Jump Game ||
  • Permutations
  • Rotate Image
  • Group Anagrams
  • Maximum Subarray
  • Spiral Matrix
  • Jump Game
  • Merge Intervals
  • Unique Paths
  • Minimum Path Sum
  • Set Matrix Zeroes
  • Search A 2D Matrix
  • Sort Colors
  • Subsets
  • Word Search
  • Validate Binary Search Tree
  • Binary Tree Level Order Traversal
  • Construct Binary Tree From PreOrder And Inorder Traversal
  • Flatten Binary Tree To Linked List
  • Longest Consecutive Subsequence
  • Palindrome Partitioning
  • Copy List With Random Pointer
  • Word Break
  • Linked List Cycle II
  • Longest Repeating Character Replacement
  • Minimum Window Substring
  • Valid Anagram
  • Group Anagrams
  • Valid Parantheses
  • Valid Palindrome
  • Longest Palindrome Substring
  • Palindrome Substrings
  • Encode and Decode Strings