UVa 100. The 3n+1 Problem: Solving with a Brute-force Algorithm
The UVa 100: The 3n+1 Problem is about collatz problem, which we have discussed in details in a recent post. The following Java code describes a brute-force algorithm to solve this problem. In addition, a memoization technique is incorporated to reduce redundant computations and thereby, to enhance efficiency of this brute-force algorithm. [gist]5124268[/gist]
Please leave a comment if you have any query. Thank you.
See Also

Collatz Problem a.k.a. 3n+1 Problem.

UVa 371. Ackermann Function.
Comments ()