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, which is the first element of the array.
Complete the code to initialize the right pointer at the end of the array.
int right = [1];The right pointer should start at the last valid index, which is array.Length - 1.
Fix the error in the while loop condition to continue while left is less than right.
while (left [1] right) { // process elements }
The loop should run while left is less than right to avoid overlapping pointers.
Fill both blanks to move the left pointer forward and the right pointer backward.
left [1]; right [2];
Use ++ to increase left pointer by 1 and -- to decrease right pointer by 1.
Fill all three blanks to swap elements at left and right pointers and then move both pointers.
int temp = array[[1]]; array[[2]] = array[[3]];
Swap elements by storing array[left] in temp, then assign array[right] to array[left].
