Distinguish recursive and iterative algorithms (#740)