Most asked questions in MAANG Placements for Developers.
Here are a few questions asked in one of the MAANG (META, Apple, Amazon, Netflix, Google) placements to developers. Try whether you understand them or not and do a follow and clap.
Before starting. If you want to be the part of CODE Culture Community. Just fill out the form to join the Free Code Culture Sessions on Sunday and get your questions answered about coding and career. I am form click me
1: Coin Change
You are given coins of different denominations, represented by an array — of coins of size n. You are also given a value target. Find the different number of combinations that make up the amount target. Assume that you have an infinite number of each kind of coin.
Level
Medium
Companies
Amazon, Apple, Microsoft, Goldman Sachs
2: Sliding Window Maximum
You are given an array of integers A and a number k which represents the size of the window. The window covers k elements and starts at the left end of the array. The window moves one index to the right at every step. You need to return an array with the max element inside the window at every step.
Level
Hard
Companies
Amazon, Flipkart, Microsoft
3: Maximum path sum in a matrix
Given a matrix M of size n*m, find the maximum path sum. Here, a valid path starts at any element in the first row and ends at any element on the last row. At every step we can move one cell in one of three directions:
Down
Diagonally to left
Diagonally to right
Level
Medium
Companies
Amazon, Flipkart, MakeMyTrip, Microsoft, Skype
4: Trapping Rain Water
Given an array A where each element denotes the height of blocks, calculate the total volume of water that can be trapped when it rains.
Note: one cubic block has a volume of 1 unit.
Level
Hard
Companies
Amazon, Goldman Sachs, Microsoft, Google, facebook
5: Number of Islands
You are given a 2-D matrix surface of size n*m. Each cell of the surface is either 1 (land) or O (water).
Find the number of islands on the surface.
An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. Assume all four edges of the surface are all surrounded by water.
Level
Hard
Companies
LinkedIn, Adobe, Microsoft, Google, Facebook
6: Best Time to Buy and Sell Stocks
You are given an array of prices where prices[i] denotes the price of a stock on the ith day. You want to maximize the profit by buying a stock and then selling it at a higher price.
Suppose you can make a single buy and single sell at any date after you buy, what is the maximum profit that you can make?
Level
Easy
Companies
LinkedIn, Adobe, Microsoft, Google, Facebook
7: Search Rotated Sorted Array
You are given a list of unique integers which are sorted but rotated at some pivot. You are also given a target value and you have to find its index in the list. If it is not present in the list, return -1.
Example:
List: [4, 5, 6, 7, 1, 2, 3]
Target value: 6
Resultant index: 2
Level
Medium
Companies
Adobe, Flipkart, Apple, Microsoft, and Google.
if you have any questions or suggestions just do let me know on my Instagram or at codeculturepro@gmail.com
