Shift the remaining elements after removing a number from an...
and the "break" statement will halt the inner loop's execution before returning to the outer loop. As for Solution 2, it is difficult for me to comprehend your desired outcome without access to the complete code for execution.