I'm really confused about this, could anyone help me out and explain this problem?


  • 0
    L

    I've seen several solutions.
    First,The while loop is not the same:
    Some use while(end-start>1),some use while(left < right),and some use while(nums[lo]>nums[hi] && lo<hi)

    Second,, some uses right = mid; and some use right = mid-1;

    I am really confused about this... and i don't know how to write this in correct way...
    Could anyone kindly help me on this? thanks.

    I


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.