Top interview question Leetcode

Easy

Array

Strings

Linked List

Trees

Sorting and Searching

Dynamic Programming

Design

Math

 Fizz Buzz
 Count Primes
 Power of Three
 Roman to Integer

Others

 Number of 1 Bits
 Hamming Distance
 Reverse Bits
 Pascal’s Triangle
 Valid Parentheses
 Missing Number

Medium

Array and Strings

 3Sum
 Set Matrix Zeroes
 Group Anagrams
 Longest Substring Without Repeating Characters
 Longest Palindromic Substring
 Increasing Triplet Subsequence
 Missing Ranges
 Count and Say

 

Linked List

 Add Two Numbers
 Odd Even Linked List
 Intersection of Two Linked Lists

 

Trees and Graphs

 Binary Tree Inorder Traversal
 Binary Tree Zigzag Level Order Traversal
 Construct Binary Tree from Preorder and Inorder Traversal
 Populating Next Right Pointers in Each Node
 Kth Smallest Element in a BST
 Inorder Successor in BST
 Number of Islands

 

Backtracking

 Letter Combinations of a Phone Number
 Generate Parentheses
 Permutations
 Subsets
 Word Search

 

Sorting and Searching

 Sort Colors
 Top K Frequent Elements
 Kth Largest Element in an Array
 Find Peak Element
 Search for a Range
 Merge Intervals
 Search in Rotated Sorted Array
 Meeting Rooms II
 Search a 2D Matrix II

 

Dynamic Programming

 Jump Game
 Unique Paths
 Coin Change
 Longest Increasing Subsequence

 

Design

 Flatten 2D Vector
 Serialize and Deserialize Binary Tree
 Insert Delete GetRandom O(1)
 Design Tic-Tac-Toe

 

Math

 Happy Number
 Factorial Trailing Zeroes
 Excel Sheet Column Number
 Pow(x, n)
 Sqrt(x)
 Divide Two Integers
 Fraction to Recurring Decimal

 

Others

 Sum of Two Integers
 Evaluate Reverse Polish Notation
 Majority Element
 Find the Celebrity
 Task Scheduler

 Hard

Array and Strings

 Product of Array Except Self
 Spiral Matrix
 4Sum II
 Container With Most Water
 Game of Life
 First Missing Positive
 Longest Consecutive Sequence
 Find the Duplicate Number
 Longest Substring with At Most K Distinct Characters
 Basic Calculator II
 Sliding Window Maximum
 Minimum Window Substring

 

Linked List

 Merge k Sorted Lists
 Sort List
 Copy List with Random Pointer

 

Trees and Graphs

 Word Ladder
 Surrounded Regions
 Lowest Common Ancestor of a Binary Tree
 Binary Tree Maximum Path Sum
 Friend Circles
 Course Schedule
 Course Schedule II
 Longest Increasing Path in a Matrix
 Alien Dictionary
 Count of Smaller Numbers After Self

 

Backtracking

 Palindrome Partitioning
 Word Search II
 Remove Invalid Parentheses
 Wildcard Matching
 Regular Expression Matching

 

Sorting and Searching

 Wiggle Sort II
 Kth Smallest Element in a Sorted Matrix
 Median of Two Sorted Arrays

 

Dynamic Programming

 Maximum Product Subarray
 Decode Ways
 Best Time to Buy and Sell Stock with Cooldown
 Perfect Squares
 Word Break
 Word Break II
 Burst Balloons

 

Design

 LRU Cache
 Implement Trie (Prefix Tree)
 Flatten Nested List Iterator
 Find Median from Data Stream
 Range Sum Query 2D – Mutable

 

Math

 Largest Number
 Max Points on a Line

 

Others

 Queue Reconstruction by Height
 Trapping Rain Water
 The Skyline Problem
 Largest Rectangle in Histogram