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.
Check this: https://www.codewars.com/kata/52b757663a95b11b3d00062d/discuss#67542f9cd8369da1c011f1e7
Can you explain throw line ? I could not understand it!
Can you explain throw line ? I could not understand it!
This Kata is specifically designed to be solved in the C language, where the use of null-terminated strings (C-strings) is fundamental to the challenge. While I understand the suggestion to make the title more explicit by referencing C-strings, I believe the current title is sufficient. Since this Kata is limited to C, and strings in C inherently follow the null-terminated convention, the title should not cause confusion within its intended context.
I still recommend adding something about null-terminated strings (or C-strings) to the title to avoid confusion. This kata isn't really about the general concept of strings in informatics; it's focused on a specific type of it.
I prefer to maintain const-clarity: everything intended to be constant, I explicitly declare as constant. It's a habit, much like fastening a seatbelt, 99.9% of the time, it may seem unnecessary, but that one time it matters, it can save your life. Besides, it costs nothing to just type one extra symbol.
well dang pretty cool
cute
Forked and approved to resolve MC, thanks!
This comment is hidden because it contains spoiler information about the solution
The function failed! f(x) = 24.3+(83.3/(69.3*(x^x*x^42.3-9.7^76.5/87.9^x*92.5^2.5)^x/log(x*4.7^x/49.3)^28.4-21.2)^x/x), x = (-4.69,8.75)
Expected: equal to (24.3,7.17589e-06) (+/- (0.0078125,0.001))
Actual: (1.03767e+18,-1.20504e+19)
wolframalpha gives me result: 1.03767×10^18 - 1.20504×10^19 i
It's hard to find solution, including mine, which will have chance to pass random tests in first ten attmpts.
Such eh masterpiece
This comment is hidden because it contains spoiler information about the solution
I did what you ask. No need for a reference solution
Also, I increased the number of test to 500, so the probability of getting every length from 1 to 50 is ~99.8% (before it was ~0.02%).
Everything looks great to me, but I suggest including
<cstddef>
since you usestd::size_t
. On another note, I just think it's a bit of a missed opportunity that vectors of size == 1 are not included in random tests. I think this might be a case where using a reference solution instead of pre-generating answers can simplify the tests and allow for a bit more coverage. What do you think?Loading more items...