Before while (start > -1), existing judgment if (start == -1), so I suggest to adjust while do to do while,which can reduce redundant judgment.

Comment From: harawata

Thank you, @chenqimiao !