Status: 2.2 years experienced, BTech from Tier-3 College
Current Company: Top product based MNC in Bangalore
Position: SDE-1
Location: Bangalore
Date: August 2021
Q1 : Sort prime and non-prime orders.
Q2 : Given a 2D matrix with empty space and obstacles. Find shortest path from top-left to the given destination.
Q1 : Given an array and an integer k. Also you can perform an operation on this array where you can pick any element and half it i.e. arr[i] = arr[i]/2. Perform this operation exactly k times such that sum of array is minimized. Return minimum sum possible.
Q2 : House Robber (https://leetcode.com/problems/house-robber/).
Q3 : Given an integer k and an array denoting heights of trees in a forest. We can make only one cut in this forest. When a cut is made at height h, all trees with height > h are cut and fallen wood is collected.
In [8, 5, 2, 7, 9, 6, 4 ] when cut is made at height 5, wood collected is [3, 0, 0, 2, 4, 1, 0] = 10
Find a cut height p such that wood collected is more than k and as small as possible.
Mutex vs Semaphore
Behavioural Question
Q1 : A variation of jump game. Find total number of ways to reach end from start.
Q2 : Given two arrays, arr1 and arr2, both of same size. You have to pick elements from these by following these conditions.
*Only one out of arr1[i] and arr2[i] can be picked for each i >= 0 and i < n.
*Atmost X number of elements can be picked from arr1.
*Atmost Y number of elements can be picked from arr2.
*Find maximum sum possible after picking these elements.
Question on DNS Server.
Behavioural Question.
Learnings -> Answers on Behaviorals and Leadership Principles needs to be flawless. If you are making mistakes during the interview, make sure they are minor and in DS/Algo questions, not in Behaviourals. That's the only margin for error.