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.
in every world outside your little computer science problem. your problem is that you don't see beyond your little world of computer science and math. that's why somebody without a CS degree is signing your paycheck.
closed form solutions have limited application in the real world. the real world is non-linear. nobody gives a crap about the sum of first n-odd numbers in any real world application. in my view the purpose of the kata is to recognize the pattern in the numbers and think through how to replicate the pattern in code, and then solve the pattern. the purpose of this 7-kyu kata is to help new programmers learn list comprehension, range() and other features of the python language. newbies can't learn programming from these "clever" math tricks. i can only imagine somebody new to programming spend an hour solving this, only to be bamboolzed by the 4 character "best practices" solution.
i'm not a genius like you though, i don't pretend to know everything.
lol, ok.
impressive
there is a bug in this, fixed here: https://www.codewars.com/kumite/67651c9687ce616211cd6f7c?sel=67652491ef2f6ff93c12dbb1
lol
neat
This comment is hidden because it contains spoiler information about the solution
this one has a bug that is fixed in the fork https://www.codewars.com/kumite/675fd4916b1c7f6076f886bb?sel=675fda9aacd7763cc3b189d3
this should be 6 kyu. the rating system on here is a joke.
there should be a system to not award points for this kind of thing
very interesting
interesting. trades lots of duplicate computations to save time on array sorting and insertion, to make it faster overall.
helps to use excel to expand out the recursive formula to understand it. the description is not the best
ugly nested ternary. unreadable.
no this is appropriately rated. not everybody recognizes a math problem when they seen one. if you try to implement this 'mechanically' instead of math you fail
edit: after solving, iterative solutions work too, i had an infinite loop. but i ended up implementing the correct math formula which will always work. iterative accumulator based solutions timeout for very large inputs (ex: bouncing_ball(300000000000000, 0.9999999, 1.5)). some 7 kyu kata actually have stress tests with extremely large numbers, so i was wary of this kata.
Loading more items...