Fix some comments.

This commit is contained in:
krahets 2023-05-22 23:13:54 +08:00
parent f6d290d903
commit 89a9741e9e
6 changed files with 9 additions and 9 deletions

View file

@ -42,8 +42,8 @@ function bubbleSortWithFlag(nums) {
/* Driver Code */
const nums = [4, 1, 3, 1, 5, 2];
bubbleSort(nums);
console.log('排序后数组 nums =', nums);
console.log('冒泡排序完成后 nums =', nums);
const nums1 = [4, 1, 3, 1, 5, 2];
bubbleSortWithFlag(nums1);
console.log('排序后数组 nums =', nums1);
console.log('冒泡排序完成后 nums =', nums1);

View file

@ -22,4 +22,4 @@ function insertionSort(nums) {
/* Driver Code */
const nums = [4, 1, 3, 1, 5, 2];
insertionSort(nums);
console.log('排序后数组 nums =', nums);
console.log('插入排序完成后 nums =', nums);

View file

@ -37,8 +37,8 @@ def bubble_sort_with_flag(nums: list[int]) -> None:
if __name__ == "__main__":
nums = [4, 1, 3, 1, 5, 2]
bubble_sort(nums)
print("排序后数组 nums =", nums)
print("冒泡排序完成后 nums =", nums)
nums1 = [4, 1, 3, 1, 5, 2]
bubble_sort_with_flag(nums1)
print("排序后数组 nums =", nums1)
print("冒泡排序完成后 nums =", nums1)

View file

@ -22,4 +22,4 @@ def insertion_sort(nums: list[int]) -> None:
if __name__ == "__main__":
nums = [4, 1, 3, 1, 5, 2]
insertion_sort(nums)
print("排序后数组 nums =", nums)
print("插入排序完成后 nums =", nums)

View file

@ -42,10 +42,10 @@ function bubbleSortWithFlag(nums: number[]): void {
/* Driver Code */
const nums = [4, 1, 3, 1, 5, 2];
bubbleSort(nums);
console.log('排序后数组 nums =', nums);
console.log('冒泡排序完成后 nums =', nums);
const nums1 = [4, 1, 3, 1, 5, 2];
bubbleSortWithFlag(nums1);
console.log('排序后数组 nums =', nums1);
console.log('冒泡排序完成后 nums =', nums1);
export {};

View file

@ -22,6 +22,6 @@ function insertionSort(nums: number[]): void {
/* Driver Code */
const nums = [4, 1, 3, 1, 5, 2];
insertionSort(nums);
console.log('排序后数组 nums =', nums);
console.log('插入排序完成后 nums =', nums);
export {};