TeleTrader Interview Question

Convert recursive method to iterative.