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 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?)
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, ;)
When I solved in Python 5 months ago, I also hit the wall with the tests, at first. Unaware of any possible formula and without google I just persisted and came up with my own solution (that actually did use some looping). I started self-teaching programming a couple of years ago & have just the most basic maths education, but I still enjoyed this kind of challenge.
Yeah, we should ban Google, burn all the books and research papers, delete all software libraries, and do everything on our own because that's obviously how software development works. Using the Internet is not allowed during exams because it can be used for cheating (searching for answers on the Internet, asking other people for help etc.), and it's impossible to prevent the latter without banning the former. And if you haven't noticed, this is not an exam.
Sounds like you don't know basic math, but whatever.
Finding an algorithm that works with a certain input range/value is programming work. Is math involved in that? Yes. Should you google for that? Not necessarily.
Current 6 kyu kata level description:
The algorithm that works isn't complex enough to rank it higher (and rank can't be changed anyway). I agree it should be mentioned loop based solutions won't work or something like that to avoid frustration.
Without the
O(1)
it would be a 7 kyu Kata.Edit: The Best-Practice solution has 33 characters + function declaration and is no code golfing, so 6 kyu is more than appropriate.
If you're interested the website regexper is a really wonderful tool which gives you a flowchart of your regular expressions so you can visualize what's going on while learning.