Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
in Online Assessments by Expert (111,830 points) | 2,862 views

1 Answer

0 like 0 dislike
3 Questions in Online Assessment. Time = 100 min
I completely bombed this test, so any leads/explanation would be really helpful :)


Q1. Given a Tree with N nodes (1 to N) , rooted at 1. You have to answer Q queries. Each query has two integers (x,y). For each query , find the maximum value of x ^ z , where z is either y or an ancestor of y. Given N <= 100000 , Q <= 100000 and the values in the query exist in the tree.


Q2. I was not able to comprehend it properly XD.


Q3. Consider an infinite 2-d grid. We are given N points (specified by their x and y coordinates) each having a different type of virus. We are also given an integer K. The viruses starts spreading at time T = 0, from each of the N points simultaneously and moves in 4 directions (up,down,left,right).
A disaster happens when any point gets affected by at least K different viruses.What is the minimum time when disaster happens ?
Given : N <= 100 , -1e9 <=x coordinate of the starting points <= 1e9 , 1e9 <=y coordinate of starting points <= 1e9 and 1<= K <=N.
by Expert (111,830 points)