The use of iterative algorithm and stack