Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Thanks, I didn't know that.

  • Default User Avatar

    it cannot be considered a kata suggestion, because there is nothing the kata author can do about it. languages versions and packages/libraries are installed by the administators of Codewars, not authors and contributors. You can request new libraries here

  • Custom User Avatar

    In Elm, It seems like the Parser module is not installer (or I understood wrong the compiler message...)
    Maybe it could be installed ?

  • Custom User Avatar

    My bad, thanks.

  • Default User Avatar

    C fork

    • better assertion messages
    • it is explained what type of pointer to return
    • removing the reference solution from preloaded
  • Default User Avatar

    Notes:

    • The weight array is at least as long as the number of names, it may be longer.
  • Custom User Avatar

    In OCaml, we seems to have more elements than people. Which is not specified in the description and cause an error when doing we traversal to compute score.

  • Default User Avatar

    Fixed, thanks!

  • Custom User Avatar

    In the OCaml version, there is a typing mistake on the solution setup : the semi-colon should be a colon on the parameter m.
    Original :

      let checkchoose (m; int) (n: int): int = 
    

    Suggestion :

      let checkchoose (m: int) (n: int): int = 
    

    Great Kata again !

  • Default User Avatar

    @Dezoway: go on with the good work!

  • Default User Avatar

    @Samickey: I slightly modified the random tests so the distance are always strictly increasing.
    Thanks for your posts and cheers!

  • Custom User Avatar

    At first I did not understand the description,then I realized that the distance is measured using the Pythagorean theorem,only one cathet is unknown.I like this kata

  • Custom User Avatar

    Thank you for your quick answer !
    Yes but I recognize that I didn't pay much attention to it and I haven't made the implication that the right angle could be on X_{i+1} and not on X_i.
    It could indeed lead to the solution, but I'm not sure it is clear enough.
    Since it is written that

    X0X1X2 is a right triangle with the right angle in X1, X0X2X3 is a right triangle with the right angle in X2, etc...

    I think one could deduce that the distances are in increasing order (and it is the case on the test cases and all basic cases I presume) since

    • in first case X0X2 is the hypothenuse so it is bigger than X0X1
    • in second case X0X3 is the hypothenuse so it is bigger than X0X2
    • etc ...

    Also it is not precised that if X_i is not visited, X_{i-1}X_iX_{i+1} is not necessarily a right triangle, so even if X_i is not visited you could presume that X_0X_{i-1} is still smaller than X_0X_{i+1} which leads to considering the right angle on X_{i-1}.

    On my opinion it would be better explained if it was written that in "X0X_{i}X_{i+1} is a right triangle which right angle is not on X0" or "is on X_{i} or X_{i+1}".
    This way it is clear that X0X_{i} and X0X_{i+1} are unordered (considering X_{i} is visited or not).

    Anyway, maybe its just me (english is not my mother tong, maybe it is clear for other) and I don't think it is a real obstacle in this kata !

    I'm the one happy that OCaml has been implemented in CW and that people bother to translate kata to OCaml !
    Cheers

  • Custom User Avatar

    If only the route always consisted of right triangles it would be cool

  • Loading more items...