Ad
  • Default User Avatar

    sin(60°)

    the centers of the balls are in a 60° axis from horizontal axe

  • Default User Avatar

    Dart translation:
    Problem with random test.

    Example 1

    "Ndx  Fed"
    

    with double space. Expected <true> actual (my result) <false>

    Another example:

    "x YCplk  2StCQf8SVNlMxh77shRzN"`
    

    with double space. But Expected <true>

  • Default User Avatar

    Hi, I'm learning a new language. So I've started with mainly 8 kyu katas. After a couple of days I'm ranked as 6kyu but I'm sure I am not in this level of knowledge.

    Maybe the score provided by a kata must decay based on the number of previous katas solved in same ranks. So it is not the same the first solved 8 kyu kata than the 100th 8 kyu kata.

    Or maybe set the katas like ELO system (from chess, o similarly from tennis). The score is based on your current level and the level of the kata. The rank increment will be increased more if the level of kata is more dificult than yours and the rank will be stagnated if the level of kata is lower than yours.

  • Default User Avatar

    Thanks, but it's an illusion ;-).

    "kata programming" is not a good place for real best practices:

    • Have you seen nobody comments the code?
    • All code is, usually, in one function

    In general, the code I study here is all "write once, read it never". The code is not written to be maintainable. :-(

  • Default User Avatar

    This solution iterate by each vec twice. One to transform into a Vec of lengths and other to sort vector.

    In Rust String.len() is not the length in characters. So the result may be wrong (if there are letters with acutes: ö, è ...)

  • Default User Avatar

    There is an itertool maxmin method. I'd save for the fold