Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,350 views
in Interview-Experiences by Expert (34,270 points) | 1,350 views

2 Answers

0 like 0 dislike

The solution to the coding round 1 question is as follows:

We can use a Depth First Search (DFS) algorithm to solve this problem.

Iterate through the set of routers, starting from the source router.
For each router, check if the distance between the current router and the destination router is within the range.
If it is, return true.
If not, check if the distance between the current router and any of the other routers is within the range.
If it is, recursively call the function with the current router as the source and the other router as the destination.
If the recursive call returns true, return true.
If not, continue iterating through the set of routers until either a true is returned, or all routers have been checked.

If all routers have been checked and a true has not been returned, return false.

by Expert (500 points)
0 like 0 dislike
Current -
Position : Software enginner 1
Experience : 5.1 years
Location : India

Interview Date : Nov 2022 - Dec 2022
Recruiter contacted via LinkedIn and scheduled a Telephonic/Screening Interview.

Telephonic Interview :

Asked about current role and organization.
About Day to Day Work
About Coding I do in day to day life (Programming language, does every code goes on production)
Cloud related questions
Rate yourself on DSA and Coding
Why you want to join Google
Which product you like most
In which product of Google you would like to work
I think it was a bit easy and it took around 40mins to complete this round
Then he scheduled Online Coding Round after one month.

Coding Round 1:
Interviewer asked only one coding question.

Given a set of N routers in 2-D coordinate, a source router, a destination router. The problem is to find if it is possible to transmit a signal from source to destination.

[(0,0),(0,8),(11,0),(20,30)]

Range = 10

so if we start from (0,0) we can reach to (0,8) and range is less than 10
similarly, from (0,8) - (11,0) but then from (11,0) - (20,30) we couldn't reach as from 0 to 30 we can not travel in range 10

I reached to solution by DFS in half an hour and then interviewer asked me to code it and then came with followed up question I was able to code that as well.

Interviewer was not much friendly and was talking very less but still I tried to explain what is going in my mind.
He was not happy in last but don't know why he asked about followed up questions not sure what was his opinion.

Lastly, I asked him about his day to day work and cloud engineer work.

It will be helpful if someone could tell me answer for round 1 question.

I'm still waiting for feedback after this round. Thought to share with community and get some more approach to the question which was asked.

PS: Sorry for bad English.
by Expert (34,270 points)
0 0
what was the follow up questions since I was asked the same question in the interview.