Ad
  • Custom User Avatar

    Yep, but with map, you dont need to use for here

  • Custom User Avatar

    i want pizza

  • Custom User Avatar

    It's the same thing

  • Custom User Avatar

    def print_statements():
    # Printing lines of code:
    data = ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]
    print("\n".join(data))

  • Custom User Avatar
  • 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

  • Custom User Avatar

    This man is right.Why, if he doesn't understand, is this his problem?I also didn't understand the explanation,and there is only one example for this kata.Setting the type:I want it to be like this, make it like this.Where is the normal admin support?

  • Custom User Avatar

    This means that your algorithm is not productive for large values.Optimize with a faster algorithm

  • Custom User Avatar

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

  • Custom User Avatar

    You're so smart why don't you have 1 kyu?

  • Custom User Avatar

    Too many show-offs.

  • Loading more items...