• + 0 comments

    // Write your code here int start = 0; int end = arr.size() - 1;

    while (start < end) {
     // Swap the elements at start and end
        int temp = arr.get(start);
        arr.set(start, arr.get(end));
        arr.set(end, temp);
                }
    
     // Move pointers towards the center
        start++;
        end--; 
    }
    return arr;********