Ad
  • Custom User Avatar

    as far as i'm concerned, i dont care about how clean the top solutions are. what's important is that i was able to solve the prob, and it has the same time complexity as the top solutions... don't care about anything else. I think you should just enjoy the fact that you were able to solve the problem with good time complexity. as for ur other comment, i don't think it's that impressive, and nope i ain't got experience already.ido think anybody can do it, just focus and take challenges as an opportunity to learn... thts my strategy

  • Custom User Avatar

    Btw you are 6 kyu by just solving 55 kata, which is rare and impressive.
    Did you already have experience before you started codewars which helped you solve higher kata(more score point) earlier and rank up quickly.

    Or were you beginner and yet you just went ahead and solved higher level kata.

  • Custom User Avatar

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

  • Custom User Avatar

    i don’t think it’s a spoiler, but as soon as you imagine the scenario, the solution will be very clear...anywy go get em

  • Custom User Avatar

    Immediately came to the discussion after understanding that it's a good kata. I wonder how long i will take.

  • Custom User Avatar

    tht s nothing. i just fixed it . But my code did pass all the tests anyway

  • Custom User Avatar

    just solved it. took me 5 hours!

  • Custom User Avatar

    Tests are not ideal but they are correct. It is hard to create randomized tests which catch all possible bugs. Your solution does not work for some simple test cases like this one:

    ( -9.21+ -8.97* -0.00+6.51+(5.50+6.81))
    

    The expected result is 7.263867809057526 but your solution returns -915.278670000000034.

    A simplified version of this test case:

    ( -9+ 8*0+6+(5+6))
    

    Expected: 8, your solution: 799.087999999999965.

  • Custom User Avatar

    You're wrong, you're not following all the rules from this kata.

  • Custom User Avatar

    U solved a 2KYU prob and came to this prob to show how smart u r, and ended up getting humbled! It should be a 5KYU tho, imo.

  • Custom User Avatar

    Dude u gotta improve the tests, 'cuz i tell ya, they’re broken! Sometimes my code passed sometimes it didn’t.also there were two cases in the fixed tests where my code gave me the right answer when tested in VSCODE, but your tests gave me a totally different answer. Note that I used the same code! To solve this issue, i had to manually handle these two cases! You gotta revise your tests guys, they’re broken!

  • Custom User Avatar

    Yes, it is always true for Java and for any sane programming language. You still need to be careful with more complicated expressions and if you use a low-level programming language like C with specific compiler flags (e.g., --ffast-math): It is possible that you get different results on different machines even if they are IEEE-754 compliant.

    Historically, the original version of Java was not strict with floating-point arithmetic and it was possible to get different results on different machines (but always the same results on the same machine). That's why Java had the modifier strictfp to make sure that floating-point results are reproducible (it was removed in Java 17).

  • Custom User Avatar

    Sorry for a bit dumb question.

    Does this mean that if I do something like

    float a = 1.0f / 3.0f;
    float b = 1.0f / 3.0f;
    System.out.println(a == b);
    

    on one machine it's always going to be true?

  • Custom User Avatar
  • Custom User Avatar

    You guys shouldnt be allowed to make any KATA. My experience was horrible. tht s the first time i had an experiance tht bad on codewars. The creators of this KATA are so terrible! Anyway i solved it but i am not satisfied!

  • Loading more items...