First implementation, iterative, queue. Use extra space