Complete the code to initialize the left pointer at the start of the array.
int left = [1];The left pointer should start at index 0 to begin sorting from the start.
Complete the code to initialize the right pointer at the end of the array.
int right = nums.[1] - 1;
In C#, arrays use Length property to get the number of elements.
Fix the error in the while loop condition to continue sorting while pointers do not cross.
while ([1] <= right) { /* sorting logic */ }
The variable 'i' is used to traverse the array and should be compared with 'right'.
Fill both blanks to swap elements at indices i and left, then move pointers accordingly.
int temp = nums[[1]]; nums[[2]] = nums[left]; nums[left] = temp; left++; i++;
We swap nums[i] with nums[left], so both blanks use 'i' as the index for the first element.
Fill all three blanks to swap elements at indices i and right, then move right pointer and continue scanning.
int temp = nums[[1]]; nums[[2]] = nums[right]; nums[right] = temp; [3]--;
We swap nums[i] with nums[right], so blanks 1 and 2 are 'i', and the last blank is 'right' to decrement.
