Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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
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.
@seba_blue I solved it! Ended up with whooping 16 line code due to my stubbornness.
i got too hung up on the process of customer talking up empty counter. So My sol was to fill the counter and reduce each customer by 1 till got to 0, when at 0 they would be replaced.
Basically decrement all to 0, each decrement would add 1 to time then return the time.
Reading top sol made me realize if i had focused just on total time each counter would operate, it would've been easier.
Exciting kata nonetheless. Cheers!
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
Immediately came to the discussion after understanding that it's a good kata. I wonder how long i will take.
tht s nothing. i just fixed it . But my code did pass all the tests anyway
just solved it. took me 5 hours!
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:
The expected result is
7.263867809057526
but your solution returns-915.278670000000034
.A simplified version of this test case:
Expected:
8
, your solution:799.087999999999965
.You're wrong, you're not following all the rules from this kata.
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.
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!
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).Sorry for a bit dumb question.
Does this mean that if I do something like
on one machine it's always going to be true?
Chill :c
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...