Пример #1
0
 protected void Solve(CollatzChain chain)
 {
     if (chain.CurrentNumber % 2 == 0)
     {
         chain.CurrentNumber /= 2;
     }
     else
     {
         chain.CurrentNumber = chain.CurrentNumber * 3 + 1;
     }
 }
Пример #2
0
 public abstract int SolveCollatzBruteForce(CollatzChain chain);
Пример #3
0
 public abstract int SolveCollatzMemoized(CollatzChain chain);