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.
Holy moly !
Dude!! :D
It is not a right way to judge, even abc.0.1.1.1.1 return True.
Functional function programming. I like it.
I tried it! didn't work, solution was timed out.
I think you can use a simple array here, which saves a call to malloc
Question asks for a recursive approach :/
or (map divisibleBy [3,5])
could be refactored like this:any divisibleBy [3,5]
This comment is hidden because it contains spoiler information about the solution
As mentioned it is incorrect for the case when zero included .
It will return True for 1.2.3.4.-45
However, if any of the leading octet is incorrect, the whole loop will continue instead of return False and break the loop - inefficient solution
incorrect for the case 0.0.0.0 which should return true
Misses cases like "127.1.1.0" which is a valid but it will return False.
I have to admit, my comment was a slightly dickish comment that this is DP, not memoization.
Sorry for that.
Read again siebenschlaefer's message: he was asking for "between" each call (more than one year ago... when he wasn't 1 kyu yet...). And between them, nothing is stored.
Answer: yes. Dictionaries are slow structures so if you want to access to "regularly ordered" data knowing where the value you need is stored, the list is the better way.
Loading more items...