Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I enjoyed working with your solution. I found yours to be faster than mine for two reasons. I noticed your use of repeat to represent arr[0]. using this rather than arr[0] in the loop really reduced the time. I also found that a for loop using range is also faster than a while loop. I have a minor question. Why not assign repeat to arr[0] before the if statement? Anyway I really enjoyed working with your code solution.