Ad
  • Custom User Avatar

    It's easy to explain ;-)
    arr.shift()
    You've modified the array arr, which is the input array

  • Custom User Avatar

    Hi, @Aloap,
    I'm sure that the correct answer should be the initial array when n=1.
    My validate function include this at the first line: if(n==1) return arr
    So perhaps something is wrong at other place. Could you tell me the details?

    EDIT: my result in random tests:

    Testing for:
    arr = [665,280,368,883,720,442,756,44,457,572,50,377,-60,294]
    n = 1 
    ✔ Test Passed: Value deep equals [665, 280, 368, 883, 720, 442, 756, 44, 457, 572, 50, 377, -60, 294]
    
  • Custom User Avatar

    If you have selected one by mistake, just click it again in the upper right corner and the traditional shortcuts should be available again.

    And you don't want to start with VIM or Emacs if you are not ready for a tough ride.

    [No worries for the n00bness, we have all been that at some point in time. Plus I need to support female coders to further stereotypes on the Italian flirtatious attitude :+1:]

  • Custom User Avatar

    AFAIK you can, as I did it in the past and it seems all fine now: which problem are you getting for it?

  • Custom User Avatar

    Piacere mio [I suspected you could speak my language by your name, but you tell me]; thank you for your kind feed and glad now it passed :)

  • Custom User Avatar

    That is a lovely place to put your code, but I can see there is a flaw: try to console.log() the input and to figure out which should be the correct reply when you fail a test.