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.
You can check here for recommend requirements for 4kyu and 3kyu kata: https://github.com/codewars/codewars.com/wiki/Kata-Ranking#blue-competent
You just need to get enough hornor point for this. Also, solving high level kata could help you reach higher kyu on lower hornor points.
I tried to solve this kata only for viewing this solution... gg bro =]]
Sorry, but which part of "adhoc method" did you just miss? :P
You can either solve this problem with math formula or using adhoc method.
For math formula, you can see solution of g964, which is the most clever.
My solution is for adhoc method.
And since raw loop is hard to follow, so code without raw loop is better practices, hence the votes here.
It uses pointer arthmatic.
When you have pointer p.
&p[n] is just equal to p + n*sizeof(p[0]).
p is pointer to char, so sizeof(p[0]) is 1
Sorry for late reply,
If N=13, rev_result is [13, 6, 3, 1], which is reverse of the expected result, so I have to use that return statement.
This comment is hidden because it contains spoiler information about the solution