Software engineer interview questions shared by candidates
You are given a stream of directions in [up, down, left, right]. Each direction means move one unit in that direction. After completing the movements, you will return to the position where you started. Compute the area of the shape you created. I was asked this when FactSet interviewed me a very long time ago. I liked the question so I sometimes use it myself when I interview other applicants..
There is no answer. The interviewer just wants to have a good discussion with you about algorithms and running time.
Does this mean the area of steps taken (not including duplicate steps)? Or the area of the steps taken AND area of the shape within those steps (assuming the steps produce a complete shape)?
use the floor function of (number of moves / 2). [n/2]
See Interview Questions for Similar Jobs
- Software Developer
- Senior Software Engineer
- Technology Analyst
- Software Development Engineer
- Graduate Software Engineer
- Java Developer
- Senior Software Developer
- Associate Software Engineer
- Graduate Software Developer
- Business Analyst
- Financial Software Developer
- Software Engineer III
- Product Manager
- Project Manager