We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public int getMiddle(int[] list, int low, int high) { int temp = list[low]; while(low < high) { while(low < high && list[high] >= temp) high--; list[low] = list[high]; while(low < high && list[low] <= temp) low++; list[high] = list[low]; } list[low] = temp; return low; }
如上,我认为只需要将while条件中的判断条件改为>=和<=即可,我测试过,可以成功。 希望您可以采纳!!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如上,我认为只需要将while条件中的判断条件改为>=和<=即可,我测试过,可以成功。
希望您可以采纳!!
The text was updated successfully, but these errors were encountered: