Fragen aus Vorstellungsgesprächen für Software engineer, von Bewerbern geteilt
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]
Fragen in Vorstellungsgesprächen für ähnliche Jobs anzeigen
- Senior Software Engineer
- Software Developer
- Software Development Engineer
- Leitender Softwareentwickler
- Project Manager
- Senior Consultant
- Product Manager
- Business Analyst
- Research Scientist