Friend interviewed at Google and described a question to me I thought was interesting but didn't know how to solve or research. (Really, I've never interviewed there. :)) Does it ring a bell? I'd like to read out the solution and understand what was actually being asked. Q (roughly): rain is falling on a dry sidewalk, how do you detect when the sidewalk is totally soaked? Interviewer emphasized "continuous" nature of problem. #interview
Flowing water on a slopy sidewalk or water pooling on a flat sidewalk?
First define the threshhold that it's "soaked". Install a detecter beside/in the side walk Or if its continuous then give a value on how "soaked" it is currently(water penetrates the sidewalk and can be detected at 10cm below etc)
I thought Google stopped asking such brain teasers?
Continuous is not something you can do without representing the problem symbolically and integrating. I really doubt that’s what they want in an interview setting. Likely they want you to be clever and say “I know we want a solution that behaves continuously, but perhaps we can solve this practically the way a calculator would. A Riemann sum or something like that.” Then map it to veryyyy small discrete units and solve like this: https://leetcode.com/problems/trapping-rain-water/description/ Gotta clearly define the problem space btw, the question is intentionally vague. They want to see how you navigate ambiguity and use teamwork to develop a usable and elegant solution others could comprehend and maintain. Start by asking: What is the definition of soaked, what are the input data shaped like, what’s the expected output? Define test cases and puzzle through the problem a bit as a team with the interviewer. Source: just finished my first month at G, and I got in after 2 failed tries.
You can install a camera to view the side walk and detect circles or circular segments on it (i.e. using Hough transform). Then the street is all wet when after some time, the amount of new circles detected is zero.
1. Calculate area of the sidewalk, multiply by 0.1cm. If volume of rain is less than this, then it can’t be soaked. 2. If the above volume is exceeded, and there is water detected at all 4 corners then it means the sidewalk is soaked. 4 corners to ensure slope, concave, etc
Sounds like flood fill to me
What about image contrast using LaPlace filter? So when a raindrop drops it makes a section of the sidewalk darker with high contrast edges. When entire sidewalk is wet then no more contrasting edges
I assume the question is about designing a device that can detect when a pavement is soaked. Then: 1. Define a threshold for ‘soaking’ 2. Put a cup on a scale and leave it on the pavement. 3. The scale is calibrated with the right weight threshold proportional to the amount of rain pour that would soak the pavement 4. Watch for the scale to signal that the threshold is crossed.
World Conflicts
Yesterday
293
Remember folks, all Israel wants is the hostages back
Tech Industry
Yesterday
6118
China CYBERATTACK on UK ? WTF
2024 Presidential Election
Yesterday
281
Crime is down
Tech Industry
Yesterday
1776
Metamate- cringe max posts by this wannabe influencer
Tech Industry
Yesterday
718
Brother beaten severely as a kid. Doesn’t speak to dad at all now.
Brain teaser?