Answer
No the given code is not correct.
Work Step by Step
When the CurrentEntry will reach the last element the condition of while loop will break hence the loop will end hence the last element will not be checked so if the smallest entry is present at the last position it will not be checked giving wrong answer.