Hoare Partition Correctness in java
问题 I am working to implement a Hoare partition into a quicksort. I am trying to completely understand the hoare partition but the book doesnt explain everything. Mainly I am just wondering what the while TRUE part means? The excerpt from the book is below. If I were to put the while part in java what would I use and why? Hoare-Partition(A,p,r) x= A[p] i = p-1 j=r+1 while true repeat j=j-1 until A [j] <= x repeat i = i +1 until A[i] >= x if i < l exchange A[i] with A[j] else return j 回答1: try