My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Project Information
Members

3n+1 Problem: Return the number of steps taken to get from a number n to a number 1, defining a step as either odd numbers progressing to 3n+1 or even numbers progressing to n/2.

Project: Find maximum 3n+1 solutions in multiple ranges of numbers, using a cache to speed up the computation. These functions will be implemented in Java and Python.

Cache: It's a simple array which stores as a value the number of cycles to complete the 3n+1 problem for each index which has been visited earlier in the program.

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=36

Powered by Google Project Hosting