Intuit OA 2024 questions
Date: 10 July 2024
There is a 2D plane of size N*M. There is fire which is there at K different points in the 2D plane. From each of these K points, the fire is spreading in a circular form with the radius of the fire increasing by time. So, if at t=1, the radius of fire (represented by R) was 2, at t=2, it becomes 4, at t=3, it become 6 and so on. "t" denotes time here. Help us determine, the number of points (points are denoted by (x,y), where both x and y are whole numbers, and are within the plane) which would not be touched by the fire.
Kady is very energetic guy and he is fond of jumping. He is standing on two dimension plane of size man square units. Plane is partitioned into unit squares. So in total there are m*n squares. Kady has his favourite number 'X', so each time when he will jump he will take jump of 'X' units.
In short, plane can be considered as a 2D matrix. Kady is currently standing at position S(p,q) where p is pth row of mati and q is qth column of matrix. Kady wants to from his position S to new position R(u,v) by taking jumps of exactly X units each time.
Determine if kady can reach his destination or not. If he can reach, print the minimum number of jumps he need to take to go from S to R.
Here, I don't remember the constraints for both.
Note:
Kady cannot go out of plane. If he do so then he will fall off the plane and dies.
If Kady wants to take jump from point A to B then jump is only feasible if Euclidean distance between these two points is X.
P.S. The OA has been over. I am eager to know the solution to these problems. If someone can explain the solution with code I would be happy to learn. Thanks in advance.