Getting a job in a product-based company might be a dream for every Software Developer. However preparing for their interview process is not an easy task, particularly for the Coding Round. If you are thinking about covering so many questions and need some selected coding round questions, then you are in the right place!
GeeksforGeeks is providing a curated list of recently asked coding interview questions designed by industry experts from several interview experiences in 2024 and 2025.
You can also take part in our mock placement contests which will help you learn different topics and practice at the same time, simulating the feeling of a real placement test environment.
Preparing for FAANG? Check Out MUST DO Coding Problems for Companies like Amazon, Microsoft, Adobe, …
Interview Questions in Product Based Companies on Maths
Easy Problems:
- Minimum steps to make product equal to one (asked in Amazon)
Medium Problems:
- Missing Point of a Parallelogram (asked in Morgan Stanley)
- Count of sum of consecutives (asked in DE Shaw)
Interview Questions in Product Based Companies on Arrays
Easy Problems:
- Even and Odd (asked in Paytm)
- Find all pairs with a given sum (asked in MakeMyTrip)
- Triplet Sum in Array (asked in Samsung)
Medium Problems:
- Kadane’s Algorithm (asked in Microsoft)
- Count pairs in array divisible by K (asked in Paypal)
Hard Problems:
Interview Questions in Product Based Companies on Searching and Sorting
Easy Problems:
- Sort an array of 0s, 1s, and 2s (asked in Amazon)
Medium Problems:
- Maximum Intervals Overlap (asked in Visa)
- Capacity To Ship Packages Within D Days (asked in DE Shaw)
- Distribute candies (asked in Microsoft)
- Binary Matrix with at most K 1s (asked in Media.net)
Hard Problems:
- Allocate minimum number of pages (asked in Amazon)
Interview Questions in Product Based Companies on Matrix
Easy Problems:
- Search in Sorted 2d matrix (asked in Adobe)
Medium Problems:
- Find Nth element of spiral matrix (asked in Amazon)
- Row with maximum 1s (asked in Morgan Stanley)
- Count all possible paths from top left to bottom right (asked in Adobe)
- Find rectangle with corners as 1 (asked in Flipkart)
Interview Questions in Product Based Companies on Strings
Medium Problems:
- Longest Palindromic Subsequence (asked in Microsoft)
- Count number of substrings (asked in DE Shaw)
- Print Anagrams together (asked in Microsoft)
- Longest substring without repeating characters (asked in Amazon)
- Substrings of length k with k-1 distinct elements (asked in Amazon)
- Sum of two large numbers (asked in Amazon)
- Multiply two strings (asked in Microsoft)
Hard Problems:
- Longest substring to form a Palindrome (asked in Samsung)
Interview Questions in Product Based Companies on Bit Magic
Easy Problems:
- Non Repeating Numbers (asked in Samsung)
Medium Problems:
- Maximum XOR of two numbers in an array (asked in Flipkart)
- Construct list using given q XOR queries (asked in Google)
Hard Problems:
- Minimum X (xor) A (asked in Adobe)
Interview Questions in Product Based Companies on Recursion
Medium Problems:
- Check if a word exists in a grid or not (asked in Microsoft)
- Generate All Possible Parentheses (asked in Microsoft)
Hard Problems:
- Solve the Sudoku (asked in Microsoft)
Interview Questions in Product Based Companies on Linked List
Easy Problems:
- Finding middle element in a Linked List (asked in Microsoft)
- Delete without head pointer (asked in Morgan Stanley)
Medium Problems:
- Merge two sorted Linked Lists (asked in Amazon)
- Reverse alternate nodes in Link List (asked in Amazon)
- Flattening a Linked List (asked in Amazon, Microsoft)
- Remove loop in Linked List (asked in Adobe)
- Clone a Linked List with next and random pointer (asked in Amazon)
- Intersection point in Y shaped Linked Lists (asked in Samsung)
Hard Problems:
- Reorder Linked List (asked in Amazon)
Interview Questions in Product Based Companies on Stack
Medium Problems:
- Next Greater Element (asked in MakeMyTrip)
- Clone a stack without extra space (asked in Flipkart)
- Infix to postfix (asked in Microsoft)
- Remove K digits (asked in Microsoft)
- Restrictive Candy Crush (asked in Goldman Sachs)
- Reverse each word in a given string (asked in Microsoft)
- Number following a pattern (asked in Amazon, Goldman Sachs)
Interview Questions in Product Based Companies on Queue
Medium Problems:
- First non-repeating character in a stream (asked in Amazon)
- Rotten Oranges (asked in Flipkart)
- Maximum of all subarrays of size K (asked in OYO)
Interview Questions in Product Based Companies on Heap
Medium Problems:
- Kth smallest element (asked in Morgan Stanley)
- Minimum cost of ropes (asked in OYO)
- Kth element in Matrix (asked in Amazon)
Hard Problems:
- Find median in a stream (asked in DE Shaw)
Interview Questions in Product Based Companies on Tree
Easy
- Largest value in each level of Binary Tree (asked in Amazon)
- Diameter of Tree (asked in Microsoft)
- Maximum GCD of siblings of a binary tree (asked in Samsung)
- Mirror tree (asked in Adobe)
Medium Problems:
- Single Valued Subtree (asked in Media.net)
- Minimum distance between two given nodes (asked in Amazon)
- Connect nodes at same level (asked in Amazon)
- Maximum sum leaf to root path (asked in Morgan Stanley)
- Check if Subtree (asked in Paytm)
- Construct Tree from Preorder Traversal (asked in Amazon)
- Clone Binary Tree with random pointer (asked in DE Shaw)
- Maximum sum of non-adjacent nodes (asked in Morgan Stanley)
Hard Problems:
- Burn Binary Tree (asked in Adobe, Amazon, Google)
Interview Questions in Product Based Companies on Binary Search Tree
Medium Problems:
- Largest BST in a Binary Tree (asked in Microsoft)
- BST to Greater Sum Tree (asked in Amazon)
- Check if BST (asked in Microsoft)
- BST to Max Heap (asked in DE Shaw)
- Remove BST keys outside given range (asked in Samsung)
Hard Problems:
- Sorted Linked List to BST (asked in Amazon)
Interview Questions in Product Based Companies on Graph
Medium Problems:
- Bridges in a graph (asked in Amazon)
- Number of islands (asked in Amazon)
- Flood fill algorithm (asked in Microsoft)
- Replace Os with Xs (asked in Amazon)
- Topological Sort (asked in DE Shaw)
- Shortest Prime Path (asked in Adobe)
Hard Problems:
- Word Ladder (asked in Flipkart)
- Critical Connections (asked in Amazon)
- Alien Dictionary (asked in Amazon)
- Number of Provinces (asked in Microsoft)
Interview Questions in Product Based Companies on Greedy
Easy Problems:
- Maximum sum without adjacents (asked in DE Shaw)
Medium Problems:
- Binary Searchable elements (asked in Microsoft, Media.net)
- Minimum Platforms needed (asked in Microsoft)
Interview Questions in Product Based Companies on Dynamic Programming
Easy Problems:
- Gold mine problem (asked in Samsung)
- Dice throw problem (asked in Microsoft)
Medium Problems:
- Count ways to reach Nth stair (asked in Adobe)
- Max of Min (asked in Amazon)
- Subset sum problem (asked in Amazon)
- Coin change (asked in Samsung)
- Egg dropping puzzle (asked in Samsung)
- Longest Palindromic substring (asked in Microsoft)
- Longest Length of Arithmetic Progression (asked in Adobe)
- Wildcard Matching (asked in Adobe)
- LCS of 3 strings (asked in DE Shaw)
- Special Keyboard (asked in Microsoft)
- 2D Kadane (asked in Microsoft)
- Maximum sum of elements not part of LIS (asked in Flipkart)
- Box stacking (asked in Amazon)
- Weighted Job Scheduling (asked in Microsoft)
- Get minimum squares (asked in Amazon)
Hard Problems:
- Maximum profit (asked in Amazon)
- Longest increasing path in Matrix (asked in DE Shaw)
- Minimum operations to convert array A to B (asked in Codenation, Google)
- Number of Words with K maximum distinct vowels (asked in Adobe)
- Palindrome Partitioning (asked in Google)
- Count occurrences of a given word in a 2D array (asked in Paytm)
Interview Questions in Product Based Companies on Trie
Medium Problems:
- Prefix match with other strings (asked in Samsung)
Hard Problems:
- Palindrome pair in an array of words (asked in Flipkart)
- Word Break (asked in Morgan Stanley)
- Find duplicate rows in a binary matrix (asked in Microsoft)
GeeksforGeeks Courses:
1. Language Foundation Courses [C++ / JAVA / Python ] Learn any programming language from scratch and understand all its fundamentals concepts for a strong programming foundation in the easiest possible manner with help of GeeksforGeeks Language Foundation Courses – Java Foundation | Python Foundation | C++ Foundation
2. Geeks Classes Live Get interview-centric live online classes on Data Structure and Algorithms from any geographical location to learn and master DSA concepts for enhancing your problem-solving & programming skills and to crack the interview of any product-based company – Geeks Classes: Live Session
3. Complete Interview Preparation Get fulfilled all your interview preparation needs at a single place with the Complete Interview Preparation Course that provides you all the required stuff to prepare for any product-based, service-based, or start-up company at the most affordable prices.
4. DSA Self Paced Start learning Data Structures and Algorithms to prepare for the interviews of top IT giants like Microsoft, Amazon, Adobe, etc. with DSA Self-Paced Course where you will get to learn and master DSA from basic to advanced level and that too at your own pace and convenience.
5. Company Specific Courses – Amazon, Microsoft, TCS & Wipro Crack the interview of any product-based giant company by specifically preparing with the questions that these companies usually ask in their coding interview round. Refer GeeksforGeeks Company Specific Courses: Amazon SDE Test Series, etc.