Interview Questions

Summary

  • Easy : 15
  • Medium : 22
  • Hard : 3

Day 1 to 100 interview question preparation

1Palindrome NumberEasyMath
2Power of TwoEasyMath
3Fibonacci NumberEasyDP, Iterative
4N-th Tribonacci NumberEasyIterative
5Water BottlesEasyArray
6Two SumEasyArray
7Add to Array-Form of Integer
Add Two Numbers in Linked List format
Easy
Array
8Maximum Product of Two Elements in an ArrayEasyArray
9TBD
10Median of Two Sorted ArraysHardArray
11Reverse Linked ListEasyLinked List
12Reverse Linked List II (between i & j)MediumLinked List
13Reverse Nodes in k-GroupHardLinked List
14Remove Nth Node From End of ListMediumLinked List
15Palindrome Linked ListEasyLinked List
16Detecting Loop in a Linked ListEasyLinked List
17Starting node of cycle in Linked ListMediumLinked List
18Delete the Middle Node of a Linked ListMediumLinked List
19Find the Duplicate NumberHardArray
20Find Minimum in Rotated Sorted ArrayMediumArray
21Search in Rotated Sorted ArrayMediumArray
22Search in Rotated Sorted Array II with DuplicatesMediumArray
23Find Minimum in Rotated Sorted Array II With DuplicatesHardArray

Leet Code 75

Array / String
1.Merge Strings AlternatelyEasy
2.Greatest Common Divisor of StringsMedium
3.Can Place FlowersEasy
4.Reverse Vowels of a StringMedium
5.Reverse words in stringMedium
6.Product of Array Except SelfMedium
7.Increasing Triplet SubsequenceMedium
8.Find the Maximum Subarray Sum (Kadane’s Algorithm)Medium
9.Rotate ArrayMedium
10.Trapping Rain Water (Kadane’s on both directions)Hard
11.Missing NumberEasy
12.Best Time to Buy and Sell StockEasy
13.Maximum Product Subarray (Kadane’s + Products)Medium
14.Find Minimum in Rotated Sorted ArrayMedium
15.Search in Rotated Sorted ArrayMedium
16.3SumMedium
17.Container With Most WaterMedium
18.(KMP) Print all occurrences of a string as a substring in another string Medium
19.Kth Largest Element in an ArrayMedium
20.2215. Find the Difference of Two ArraysEasy

Topics

Graph

Graph
1.Rotting Oranges (BFS)Medium
2.Number of Islands (BFS)Medium
3. Course Schedule (Topological sort)Medium
4.Find Eventual Safe States (TBD)Medium

Trees

Trees
1.Lowest Common Ancestor of a Binary TreeMedium

Tries

Tries
1.Longest Common PrefixMedium

Hash Table

Hash Table
1.Longest Substring Without Repeating Characters (Sliding window)Medium
2. (TBD)Longest Consecutive SequenceMedium

Two Pointers & Window Sliding

1.Max Sum of K WindowMedium
2.Maximum Points You Can Obtain from CardsMedium
3.Container With Most WaterMedium
4.Maximum Number of Vowels in a Substring of Given LengthMedium
5.Max Consecutive Ones IIIMedium
4.LongestSubArrayWithSumKEasy

Intervals

1.Minimum Number of Arrows to Burst BalloonsMedium

Heap (Priority Queue)

1.Find the Kth Largest Integer in the ArrayMedium
2.Kth Largest Element in an ArrayMedium

Linked List

1.LRU CacheMedium

Design

1.Design TwitterHard
2.Design Memory AllocatorHard
3.Design Browser HistoryMedium
4.Design Authentication ManagerMedium
5.Design an ATM MachineMedium
6.LRU CacheHard
7.Min StackMedium

String

1.Valid AnagramMedium
2.Group all AnagramMedium
3.Count occurrences of AnagramsMedium
4.Multiply StringsHard
5.Longest Palindromic SubstringMedium

Hard Problems

Below problems are not so straight forward.

Advice: Try solving for some time, but don’t take it to your heart.

Please visit https: https://codeandalgo.com for more such contents.