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.
@slacle, well, it depends on how you want to take it. Nobody forces you to solve this particular problem, which may require some math, but at the same time, you are free to ask and read questions and answers (this is how I found out I need some math formula). Once you find it out, you have to search for the formula, which is also a programmer skill.
give the wrong impression that programming requires good math knowledge
Searching and applying a simple math formula is not
good math knowledge
.Actually math is just a tool to improve performance in programming. I agree that 90% of the time you will just use the work of the people before you who did the math, but as programmers we are problem solvers per definition. If you keep programming and challenging yourself there will come a day where there is no precut algorithm and nothing you can cobble together from the existing knowledge is efficient enough. On that day you too will contribute by doing math and creating what is needed so those learning programming after you will have even less reasons to understand math to program. Programming is math - but in a cool way :D
These math problems, as opposed to programming problems which is the reason people come here, give the wrong impression that programming requires good math knowledge, while in practice it's not like that.
The code in the rightmost brackets gets executed first, converting the input string to uppercase.
Then, this value is passed into the leftmost pair of brackets (through the use of an es6 arrow function), and compared against the reversed string.
What is '.toUpperCase() doing here? ( I know what it does but why are we using it here?)
Would be hard to read skimming through but very neat.
The statement of the original kumite I forked said it's case insensitive so I followed it, though I agree with you that palindromes should have the same capitalization.
Codewars is My Math Tutor
+2
Anybody Else To Count Up?)
edit: self-catch
(chuckle)
awesome catch, thanks
There is one more serious issue discovered while translating for NASM.
Some implementations including first of mine do not check for
x
overflowing undery
.Look at the case 've just added to the C translation:
cr_assert_eq(divisible_count( 64, 73, 27 ), 0 ); /* case to check for correct overflow implementations */
Do not know what about the other languages...
But this case or similar should be added!
I'd say add to the description that the numbers are positive, just to not render all current solutions invalid.
When I studied calculus I had to deal with limits, derivatives, integrals, and you're telling me "dividing 2 numbers" is as advanced. Either you've never studied math after school, or American education is even a bigger joke than I've heard
calculus? lol, I never even took trigonometry. I guess I've just learned how to visualize numerical relationships and hack away with various tools like modulus and whatever. codewars has been my higher maths education, ;)
rowcased, that's great that you overcame it. I tried a lot of different iterable solutions because I assumed there was one that was more optimized and that is what I was missing. I know more of what O(1) implies now. I guess college level calculus is basic math?
Loading more items...