javadoc updated for iterative version of solution