Archive of my unsuccessful 2012, Associate Programmer test for Turtle Rock Studios.
I had a total of 4 questions to program over the course of a week. Problems included:
-
Write a linked list class. Create a list of 1000 random values, one value per list element.
Sort the list in ascending order. -
Write a very simple 3D vector class. Given 1000 randomly distributed and immobile points in a known volume of space, implement a function that returns the closest of these points to the given vector position argument in a time-efficient manner.
-
Write a function that reflects a 3D vector off of a planar surface, given the surface normal.
-
Write a simple particle system where N particles are given a random initial velocity away from a given starting point. After their creation, each particle is influenced only by gravity and bounces off of an arbitrarily oriented “ground” plane. Each particle should “die” after its random lifetime has elapsed.
Entry points for all programs can be found in their respective Main.cpp. Enjoy!