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.
Cool way to use data structure, but it is worse than just other O(N) in time solutions, is it not? Because this solution also take O(N) in space and O(N) in time.
Where I can see Equals(sol) source?
I'm tried round, floor, ceil, trunc with 1e-6 precision (and -7 and -5) and I can't pass the first test.
All tests on my desktop are passed when I compare like abs(res - expected) < 1e-6.
Or which function did you use for truncating?
std::floor(res * 1e6) / 1e6 - didn't work. (round, trunc, ceil)
Don't understand, how some people passed this.
going_Tests
Fixed__Tests
Log
1.275
1.2125
1.173214
1.146651
✘ Expected: equal to 1.14665 Actual: 1.14665
Random_tests
Log
****************** Random Tests **** going
1.071828
1.055739
1.077427
1.038521
1.052786
1.173214
1.032292
1.101158
✘ Expected: equal to 1.10116 Actual: 1.10116
I think this is some issues in Equals function
Yes, you're correct. At the time of writing this Kata I did not read the problem carefully enough - a nasty habit of mine. I can't edit this solution, and haven't the need for re-practicing this Kata. I guess this Kata and your, and my comments can be a learning experience for other's.
if (s1.empty() || s2.empty())
return true;
why this check is true always? according to the task - "AA","" is false, isn't it? but "z1","" is true.