Ad
  • Custom User Avatar

    I followed

    • There will only ever be three cups.
    • Only two cups will be swapped at a time.
    • The cups and their switches will be refered to by their index in a row of three, beginning at one. So [[1,2]] means the cup at position one, is swapped with the cup at position two.
    • Arr will be an array of integers 1 - 3 organised in pairs.
    • There won't be any empty sub-arrays.
    • If arr is just an empty array b should be returned.

    for both translations :-)