diff --git a/docs/notes/算法 - 排序.md b/docs/notes/算法 - 排序.md index 8b6142e8..ad304440 100644 --- a/docs/notes/算法 - 排序.md +++ b/docs/notes/算法 - 排序.md @@ -95,7 +95,7 @@ public class Bubble> extends Sort { int N = nums.length; boolean isSorted = false; for (int i = N - 1; i > 0 && !isSorted; i--) { - hasSorted = true; + isSorted = true; for (int j = 0; j < i; j++) { if (less(nums[j + 1], nums[j])) { isSorted = false;