You are on page 1of 15

2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Must Do Coding Questions for Product Based


Companies
Difficulty Level : Medium ● Last Updated : 25 Feb, 2021

A s the placement season is back, Geeksforgeeks is here to help you crack the inter view.

We have selected some most commonly asked and MUST DO practice problems to crack

Product-based Company Inter views.

You can also take par t in our mock placement contests which will help you learn

different topic s and practice at the same time, simulating the feeling of a real placement

test environment.

If you are looking for Old MUST DO list, please refer MUST DO Coding Problems for

Companies like Amazon, Microsoft, Adobe, …

In case you are a new user, we strongly recommend you to go through the below

Improved list.

Note : Now you can track your progress of these questions Must Do Inter view

Preparation Course. ▲

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 1/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Topic :

Math Heap

Array Binar y Tree

Searching BST

Sor ting Graph

Matrix Trie

String Greedy

Hashing DP

Bit Masking Recursion

Linked List Back-Tracking

Stack Algorithms

Queue Design

Math

Easy

Missing Number in Array

Trailing Zeros in Factorial

Medium

A Simple Fraction

Hard

Nth Natural Number

Smallest Positive Integer that can not be represented as Sum

Arrays

Easy

Rotate Array

Majority Element

Plus one

Array of alternative +ve and -ve no.s

Product Array puzzle

Frequencies of Limited Range Array Elements

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 2/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Large Factorial

Medium

Jump Game

Maximum number of 1’s

Stock Buy and Sell

Longest Consecutive Subsequence

Maximum value of difference of a pair of elements and their Index

Maximum index

K-th element of two sor ted Arrays

Trapping Rain Water

3 sum closest

Hard 

Maximum circular Subarray Sum

Merge without Extra Space

Searching

Easy

Search inser t position of K in a sor ted array

Collecting Wood

Left most and right most index

Bitonic Point 

Medium

Search an element in sor ted and rotated array

Square root of a number

Find missing in second array

Hard

Painter ’s Par tition Problem

Median of 2 sor ted arrays of Different sizes

Allocate minimum number of pages

Sor ting

Easy

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 3/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Wave array

Medium

Count the number of possible triangles

Triplets with sum with given range

Count Inversions

Relative Sor ting

Minimum Platforms

Maximum Index

Matrix

Easy 

Sor t  a 2D vector diagonally

Medium

Spiral Matrix

Boolean matrix

Rotate matrix by 90 degrees

Search in a row-column sor ted Matrix

Row with maximum 1s

String

Related Articles
Easy 

Reverse words in a given string

Longest Common Prefix

Roman Number to Integer

Medium

Next higher palindrome number using the same set of digits

Length of longest prefix suffix

Smallest window in string containing all characters

Validate an IP address

Implement Atoi

Look and say Pattern

Longest K unique characters substring

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 4/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Hashing

Easy 

Key Pair

Top K Frequent Elements in Array

Intersection of two arrays

Array Pair Sum Divisibility Problem

Medium

Triplet Sum in Array

Length of the longest substring

Is Sudoku Valid

Print Anagrams Together 

Subarrays with sum K

Longest subarray with sum divisible by K

Bit Masking

Easy 

Reverse bits

Number of set bits

Sum of two integers

Check whether K-th bit is set or not

Longest Consecutive 1’s

Medium 

Find the element that appears once

Gray code

Maximum AND

Hard 

Maximum subset XOR

Bit Difference

Linked List

Easy

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 5/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Merge Two Sor ted Linked Lists

Reverse a Linked List

Delete a Node without Head Pointer

Add two Numbers represented by linked lists

Finding middle element in a linked list

Check if linked list is palindrome

Medium

Rearrange a linked list

Detect and Remove a loop In Linked List

Merge Sor t for Linked List

Intersection of Linked List

Rotate Linked List by K places

Flattening a Linked List

Reverse a linked list in groups of given size

Par tition a linked list around a given value

Hard

Clone a linked list with next and random pointers

Stack

Easy

Parenthesis Checker

Infix to Postfix

Restrictive Candy Crush

Medium

Next Larger Element 

Stock span problem

The Celebrity Problem

Maximum Rectangular Area in a Histogram 

Hard

Longest Valid Parentheses

Maximum of minimum for ever y window size

Remove K digits


132 Geek y Buildings

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 6/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Queue

Medium

Maximum of all subarrays of size K

Circular tour (Sliding Window)

Heap

Easy

Rearrange Characters

Minimum Cost of ropes

Medium

Kth largest element of stream

Merge k sor ted arrays

Hard

Median of stream

Binar y Tree

Easy

Symmetric Tree

Zigzag Tree Traversal

Checked for Balanced tree

Height of Binar y Tree

Diameter of Binar y tree

Determine if two trees are identical

Minimum depth of binar y tree

Medium

Check if subtree

Inorder Traversal (iterative)

Preorder Traversal (iterative)

Postorder Traversal(iterative)

Ver tical Traversal of a Binar y Tree


https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 7/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Construct Binar y Tree from Preorder and Inorder Traversal

Connect nodes at same level

Lowest Common Ancestor of a Binar y Tree

Boundar y Traversal

Sum tree

Hard

Binar y Tree to Doubly Linked List

Maximum sum path between two leaf nodes

Burning Tree

Binar y Search Tree

Easy

Check for BST

Array to BST

Inorder Successor in BST

Kth Largest Element in a BST

Medium

Remove BST keys outside the given range

Pair with given target in BST

Unique BSTs

Preorder Traversal and BST

Hard

Merge two BST ’s

Fixing two nodes of a BST

Graph

Medium

Number of Islands

COVID Spread

Prerequisite tasks

Strongly Connected Component

Minimum swaps to sor t

Shor test path


https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 8/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Circle of Strings

Snake and Ladder Problem 

Detect cycle in an undirected graph

Detect cycle in a directed graph

Check for Bipar tite graph

Unit Area of Largest region of 1s

Hard

Alien Dictionar y

Word Ladder

Trie

Medium

Minimum XOR value pair

Word Boggle – II

Most frequent word in an array of strings

Minimum XOR value pair

Greedy

Medium

Number of Islands

COVID Spread

Prerequisite tasks

Strongly Connected Component

Minimum swaps to sor t

Shor test path

Circle of Strings

Snake and Ladder Problem 

Detect cycle in an undirected graph

Detect cycle in a directed graph

Check for Bipar tite graph

Unit Area of Largest region of 1s

Hard

Alien Dictionar y

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 9/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Word Ladder

Trie

Medium

Minimum XOR value pair

Word Boggle – II

Most frequent word in an array of strings

Minimum XOR value pair

DP

Easy 

Count ways to reach the n’th stair

Get Minimum Squares

Nth Fibonacci Number

Medium

0 – 1 Knapsack Problem

Number of Coins

Edit distance

Maximize The Cut Segments

Box Stacking

Longest Increasing Subsequence

Longest Palindromic Substring

Longest Common Substring

Longest Common Subsequence

Wildcard Pattern Matching

Total Decoding Messages

Max length chain

Maximum sum increasing subsequence

Minimum number of jumps

Subset Sum Problem

Maximum path sum in matrix

Player with max score

Shor test Common Supersequence

Palindrome Par titioning ▲

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 10/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Form a Palindrome

Hard

Boolean Parenthesization

Matrix Chain

Maximum Profit

Minimum Cost Path

Par tition Equal Subset Sum

Recursion

Easy

Number of Paths

Pascals Triangle

Josephus problem

Tower of Hanoi

Medium

Special Keyboard

Flood Fill Algorithm

Back tracking

Easy

Permutations    

Medium

Letter Combinations of a Phone Number

Generate Parentheses

Word Boggle – 1

Rat in a Maze Problem

Largest number in K swaps

Combination Sum

Hard

Palindrome Par titioning

N-Queen Problem

Solve the Sudoku


https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 11/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

Algorithms

Easy

Bubble Sor t

Inser tion Sor t

Selection Sor t

Medium

Merge Sor t

Quick Sor t

Heap Sor t

Count Sor t

Kadane Algorithm

Minimum Spanning Tree

Implementing Dijkstra Algorithm

Floyd Warshall

Bellman Ford Algorithm

Rabin-Karp Algorithm

KMP algorithm

Z Algorithm

Huffman Encoding

Design

Easy

Stack using two queues

Queue using stack

Medium

Ternar y Search

Binar y Heap Operations

LRU cache

Trie | (Inser t and Search)

You may also check our latest online course series to learn DS & Algo is named DS A ,

which covers ever ything about Data Structures from Basic to Advanced.

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 12/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

 Like 20

 Previous Next 

RECOMMENDED ARTICLES Page : 1 2 3

How to Get a Job in Product Based Geeks Coding Challenge [GCC


01 05
Companies? 2019] - A Three Day Coding
28, Aug 19
Challenge By GeeksforGeeks
06, Dec 19

Difference Between a Product


02
Based Company and Service Based [TopTalent.in] How Tech companies
06
Company Like Their Résumés
20, Jul 20 06, Nov 12

Programming For Beginners: 10 What is the future of those students


03 07
Best HTML Coding Practices You who are getting selected in mass
Must Know ▲ recruiting companies
https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 13/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

17, Dec 19 12, Sep 18

SQL Interview Questions asked in 5 Crazy Yet Successful Companies


04 08
Top Tech Companies Started By Elon Musk
15, Feb 21 22, Oct 19

Ar ticle Contributed By :

GeeksforGeeks

Vote for di culty

Current di culty : Medium

Easy Normal Medium Hard Expert

Article Tags : GBlog

Improve Article Report Issue

Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.

Load Comments

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 14/15
2/26/2021 Must Do Coding Questions for Product Based Companies - GeeksforGeeks

5th Floor, A-118,


Sector-136, Noida, Uttar Pradesh - 201305
feedback@geeksforgeeks.org

Company Learn
About Us Algorithms
Careers Data Structures
Privacy Policy Languages
Contact Us CS Subjects
Copyright Policy Video Tutorials

Practice Contribute
Courses Write an Article
Company-wise Write Interview Experience
Topic-wise Internships
How to begin? Videos

@geeksforgeeks , Some rights reserved

https://www.geeksforgeeks.org/must-do-coding-questions-for-product-based-companies/ 15/15

You might also like