Ad
  • Custom User Avatar

    Cause it's very fast solution. But who cares about performance in 2k19 when a fridge has more cores and RAM than my PC. Sarcasm)

  • Custom User Avatar

    "WARNING: Segment may contain billion elements, to pass this kata, your solution cannot iterate through all numbers in the segment!"
    the point of this kata is to come up with an idea how to calculate the result very fast without even going through the sequence and it requires making some observations about binary numbers

    good luck! =]

  • Custom User Avatar

    Sometimes it pays to try unconventional approaches. This kata cries out for a graph-based solution, but this approach came to me when I considered trying them.

    Glad you enjoyed it. Happy coding! :)

    Edit: Wanted to share that I feel developers too often settle for their first working solution. This first working solution is often overly complex. They settle for this rather than refining it into something of beauty and elegance.

  • Custom User Avatar

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

  • Custom User Avatar

    Your grammar is slightly wrong.

    Change "no ones like this" to "no one likes this"
    Change "likes" to "like"
    Change "like this" to "others like this" in the statement "Alex, Jacob and 2 like this"

    0 people = "likes"
    1 person = "likes"
    > 1 person = "like"

    Make sure you read the output box properly.