Ejemplo n.º 1
0
 protected void Solve(CollatzChain chain)
 {
     if (chain.CurrentNumber % 2 == 0)
     {
         chain.CurrentNumber /= 2;
     }
     else
     {
         chain.CurrentNumber = chain.CurrentNumber * 3 + 1;
     }
 }
Ejemplo n.º 2
0
 public abstract int SolveCollatzBruteForce(CollatzChain chain);
Ejemplo n.º 3
0
 public abstract int SolveCollatzMemoized(CollatzChain chain);