Test Cases (0/3)
    • swapFirstLast([1,3,5]) to return [5,3,1]

    • swapFirstLast([1,3,5,7,9]) to return [9,3,5,7,1]

    • swapFirstLast([1,3]) to return [3,1]

    Output
    Michael
      (0/300)