Interview Question for Jr. Software Engineers
- 0of 0 votes
AnswersAs part of our recruitment process for developers, we give our candidates the following programming exercise to
- emcho.coh March 05, 2015 in United States
allow us to asses coding style and design. The exercise is to write a minimalistic game in a programming language of
your choice (from a given list) according to the description below.
Please note that we do not intend that you will invest a lot of time in the implementation and make something that
looks like a real game. What we mainly care about is good design and coding style.
In our game there is a carousel with 8 seats in the center of the screen. On the left side of the carousel, there is an
additional seat labeled ‘Start’ and to its right, a seat labeled ‘Finish’. There are 4 kids on the carousel at random
seats. You have an avatar who is initially found in the ‘Start’ seat
Your goal is to move your avatar to the ‘Finish’ seat. You move your avatar using the ‘Jump’ button. When clicking
the button the nearest seat to the current seat of your avatar is considered: if this seat is vacant, your avatar will
move to this vacant seat and you get 10 points, if the seat is taken you lose a life point.
The challenge is that the carousel is constantly rotating clockwise. To be clear, the carousel rotation is smooth (not in
steps of a seat).
If your lives go to 0, the game ends. When you reach the ‘Finish’ seat, you get 50 points and the carousel increase its
rotation speed, now your goal is to go back to the ‘Start’ seat, and on it goes.
Tips & comments:
• The tricky part of the exercise is the spinning carousel. Of course the seat and people that are on the
carousel are moving in circles. There are two ways that you can implement this:
1. By thinking of the table as standing still and the seats as moving in circles.
2. Using affine transforms.
We suggest that you use the first approach as it will be simpler. The second approach has some advantages,
but use it only if you are familiar with it.| Report Duplicate | Flag | PURGE
Jr. Software Engineer
Interview Type: Written Test