Recently Asked Interview Questions in Product Based Companies
Getting a job in a product-based company might be a dream for every Software Developer. But preparing for their interview process is not so easy task, particularly for Coding Round. If you are thinking that how to cover so many questions and you need some selected coding round questions then you are in right place!
GeeksforGeeks is providing a curated list of recently asked coding interview questions which is designed by industry experts from several interview experiences of 2020 and 2021.
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, …
Topic:
Math
- Easy
- Minimum steps to make product equal to one (asked in Amazon)
- Medium
- Missing Point of a Parallelogram (asked in Morgan Stanley)
- Count of sum of consecutives (asked in DE Shaw)
Arrays
- Easy
- Even and Odd (asked in Paytm)
- Find all pairs with a given sum (asked in MakeMyTrip)
- Triplet Sum in Array (asked in Samsung)
- Medium
- Kadane’s Algorithm (asked in Microsoft)
- Count pairs in array divisible by K (asked in Paypal)
- Hard
Searching and Sorting
- Easy
- Sort an array of 0s, 1s, and 2s (asked in Amazon)
- Medium
- 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
- Allocate minimum number of pages (asked in Amazon)
Matrix
- Easy
- Search in Sorted 2d matrix (asked in Adobe)
- Medium
- 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)
Strings
- Medium
- 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
- Longest substring to form a Palindrome (asked in Samsung)
Bit Magic
- Easy
- Non Repeating Numbers (asked in Samsung)
- Medium
- Maximum XOR of two numbers in an array (asked in Flipkart)
- Construct list using given q XOR queries (asked in Google)
- Hard
- Minimum X (xor) A (asked in Adobe)
Recursion
- Medium
- Check if a word exists in a grid or not (asked in Microsoft)
- Generate All Possible Parentheses (asked in Microsoft)
- Hard
- Solve the Sudoku (asked in Microsoft)
Linked List
- Easy
- Finding middle element in a Linked List (asked in Microsoft)
- Delete without head pointer (asked in Morgan Stanley)
- Medium
- 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
- Reorder Linked List (asked in Amazon)
Stack
- Medium
- 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)
Queue
- Medium
- 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)
Heap
- Medium
- Kth smallest element (asked in Morgan Stanley)
- Minimum cost of ropes (asked in OYO)
- Kth element in Matrix (asked in Amazon)
- Hard
- Find median in a stream (asked in DE Shaw)
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
- 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
- Burn Binary Tree (asked in Adobe, Amazon, Google)
Binary Search Tree
- Medium
- 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
- Sorted Linked List to BST (asked in Amazon)
Graph
- Medium
- 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
- Word Ladder (asked in Flipkart)
- Critical Connections (asked in Amazon)
- Alien Dictionary (asked in Amazon)
- Number of Provinces (asked in Microsoft)
Greedy
- Easy
- Maximum sum without adjacents (asked in DE Shaw)
- Medium
- Binary Searchable elements (asked in Microsoft, Media.net)
- Minimum Platforms needed (asked in Microsoft)
Dynamic Programming
- Easy
- Gold mine problem (asked in Samsung)
- Dice throw problem (asked in Microsoft)
- Medium
- 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
- 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)
Trie
- Medium
- Prefix match with other strings (asked in Samsung)
- Hard
- 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.