I understand the recursive algorithm. Can someone explain the iterative one? Some solutions look for i = even/odd while others look at i mod 3.
The following is what