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.
Take 2 days to solve it!! Should This Kata be 7kyu?
Finally I solved it using recursion inside nested function.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
because may be in this pin there is " " - secret space or anothe simbol.
ATM machines don't have '-' or '.' or anothe simbol on the keypad. Why is that something we would need to check for? Now there is critical wrong in information.
Try reading the posts below, you're not the first one to trip with that test.
Your function returns
true
.I think some time we should skip this wasting of times and go next level!
This comment is hidden because it contains spoiler information about the solution
I Update this : num_pill == 1 To: num_pill <= 1. That because if the number of pillars is negative the code will be executed and they will return the distance between the first and last pillar with a negative value and that is not logic.
But if We want to work width : num_pill == 1 => we can enter the absolute value so the number of pillars will be positive even though the input is negative : Math.abs( num_pill ).
Thanks for your attention!
I don't know why do you check if the data type is an object!
You don't need to check the data type, that because the object store all data type. In addition the kata will return an object!
This comment is hidden because it contains spoiler information about the solution