EPAM Systems Interview Question

Convert recursive algorithm to iterative and vice versa