The goal for this project was simple and that was to program the Collatz Conjecture. Other names include the 3n + 1 conjecture or Hailstorm sequence. Given two integer inputs, the function should return the maximum cycle length for that range. Ex. collatz(1, 10) => 20. What the functions does is it goes through each number n (1 to 10) and calculates 3n + 1 if n is odd and n / 2 if n is even until n = 1 and counts the number of times a calculation is made and returns the maximum count.


The challenge was submitting our code to www.spoj.com and get our processing time as low as possible. We programmed this project in Python and optimized our code by implementing caches (lazy, eager, and meta) and other optimizing techniques.


Other requirements were to write both acceptance and unit tests, utilize a version control like Git, use an issue tracker, and optimize our code as much as possible. This was an individual assignment