Swift solution is impossible


  • 0
    M

    I can't think of a way to do this problem without modifying the array. The swift template code gives an [Int] argument, which is an immutable 'let' constant. I would suggest adding an 'inout' keyword but this might be too much of a hint.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.