4.2 of 5 2,087 reviews Mountain View, CA 5000+ Employees

Google Software Engineer Interview Question

I interviewed in Mountain View, CA and was asked:
"Test line-of-sight in a game that accounts for obstacles to determine if the bad guy can see you or not."
Add Tags [?]
Answer Flag Question

Part of a Software Engineer Interview Review - one of 2,770 Google Interview Reviews

Answers & Comments

of 1
Is it 2D or 3D space? For 2D space calculate the slope (y2-y1)/(x2-x1) where (x1,y1) are your coordinates, (x2,y2) other guy's coordinates, and find if any obstacle with coordinates (xi, yi) has the same slope (are on the same line).
- Alex on Jan 17, 2014 Flag Response

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.

Glassdoor is your free inside look at Google interview questions and advice. All interview reviews posted anonymously by Google employees and interview candidates.