Correct And Incorrect Algorithm