Backend Engineer | Zenskar
JP Morgan Chase | SDE 3 | YOE 3.4
Microsoft SDE - 2 | Interview Experience | Status Pending
eBay || SWE3 Interview Experience || Bangalore
Bloomberg | Interview Experience | Senior Software Engineer | NYC | Nov 2025
Google | Onsite | Router Broadcast & Shut Down
Summary
I encountered a challenging problem during my Google onsite interview that involved simulating a message broadcast and router shutdown scenario within a wireless network.
Full Experience
During my Google onsite interview, I was presented with an interesting problem related to network simulation. The interviewer asked me to define a 'Broadcast & Shut Down' message, where a router, upon receiving it, broadcasts the message to all other routers within its wireless range before shutting down and becoming inactive. I needed to determine if a message from Router A could reach Router B given a list of router locations and a wireless range. This problem required me to design a function, provide test cases, and analyze its time and space complexity.
Interview Questions (1)
Let's define a kind of message called "Broadcast & Shut Down." When a router receives this message, it broadcasts the same message to all other routers within its wireless range. Then, that router shuts down, and can no longer send or receive messages. For example, Router A is at (0, 0); Router B is at (0, 8); Router C is at (0, 17); Router D is at (11, 0). If the wireless range is 10, when Router A sends a message, it could first reach B; the message from Router B would further reach Router C but Router D would never receive this message. Given a list of routers' locations (their names and the corresponding 2D coordinates), tell me whether a message from Router A can reach Router B. 1. Write a method / function with appropriate input and output arguments. 2. Write test case's. Also, mention the Time and Space complexity for the same.