Hi everyone, recently i gave the OA of Zomato on the hackerank platform.
There were total of 3 DSA Q's each of 100 score and 13 CS-Fundamentals MCQ'S each of 5 score, and we were given the total time of 90 minutes.
Below are my memory based Q description, if anybody able to find exact Q in any coding platform, please do tag in the comments, thanks in advance.
Problem:
You're given a rooted tree. In up to K operations, you can:
Goal: Minimize the height of the final tree and return it.
Problem:
You're given a tree with n nodes. Each node already has a number of stones assigned (some may be zero).
You can only add stones (not remove).
Goal: Add the minimum total number of extra stones so that for every edge (u, v):
|stones[u] - stones[v]| == 1Problem:
Given an array arr of length n, with some elements as 0,
fill those positions with positive integers from [1, M] such that:
|arr[i] - arr[i+1]| ≤ 1Count the number of valid full arrays.
I was able to solve 1st and 3rd partially.