Ad
  • Default User Avatar

    I think I get it but can you explain why r -= names.size then r/2? I get r/2 and [n1,n2] == r and [n1,n1,n2,n2]. and just r-=names.size makes sense too but the order doesnt

    if r=52, names.size= 5... 51-5/2 = 46/2 = 23.. 23-5/2=9.. 9-5/2=2.. names[2] = penny correcly

  • Default User Avatar

    Maybe it is striaghtfoward but if it is striaghtfoward it is a very long distance in that direction because thats not the first thing to pop into my head. But, thank you for this answer maybe next time I'll keep my mind open to seeing this pattern. I went a different route with my calculations.

  • Custom User Avatar

    This is awesome, how did you get to this solution?