Status: BE CSE at Tier 2 University, 5.3 years experienced
Position Interviewed for: Delhivery
Location: Bangalore
Month: April 2021
Round 1 : DS and Algo
Duration: 1 hour
Question1:
Given an array and element n remove element from array without using extra space and print the length without n.
Q1. [1,2,2,1,3,3] n=2 output-> 4
Question 2:
Given and matrix with length n,index x ,y and an base element and element to be replaced,
Replace all the elements until no further base element can be replaced.
Input:
2 2 0
0 2 1
2 1 2
x=1,y=1, baseValue = 2,replaceValue=1
Output:
1 1 0
0 1 1
2 1 2
This is similar to rotten oranges problem: https://leetcode.com/problems/rotting-oranges/
Result : Waiting for response