示例#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);