Ad
  • Custom User Avatar

    Absolutely agreed. The description is very uncomprehensible, it was a big time waste.

    Then you do a bit of math above the examples, rule out a few incorrect ideas and you go test the idea that seems correct. After a minute of coding, done.

    I don't even feel much satisfaction or gratification after this, I can just say this Kata is an utter garbage and an overrated waste of time.

  • Custom User Avatar

    Read the description N times, still couldn't get it. Looked at example, remembered doing something related at school. Blindly implemented mathematical solution and solved the problem.

    Programming is != Mathematics, lecturers and teachers usually fails to understand this, it looks like similar problems are coming up to the surface in Codewars as well.

  • Custom User Avatar

    In general, generators are faster than list comprehensions because generators don't have allocate memory for a new list. See, https://wiki.python.org/moin/Generators for more details.

    Code using generator: return sum( 1 for sheep in arrayOfSheeps if sheep == True )