Update source codes.

This commit is contained in:
Yudong Jin
2022-12-20 13:20:20 +08:00
parent 030042e689
commit a8fb1a4f41
7 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ namespace hello_algo.chapter_array_and_linkedlist
public static void Insert(int[] nums, int num, int index)
{
// 把索引 index 以及之后的所有元素向后移动一位
for (int i = nums.Length - 1; i >= index; i--)
for (int i = nums.Length - 1; i > index; i--)
{
nums[i] = nums[i - 1];
}