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.
Your calculation for IP address is wrong. Note there are 256 IP addresses from 10.0.0.0 to 10.0.0.255, and 256 also from 10.0.1.0 to 10.0.1.255, now try to compute that for each subset.
https://stackoverflow.com/questions/134934/display-number-with-leading-zeros
i mean, have you tried it on your computer ? check out the sample tests, there is a call
zeros(1000000000)
. run that on your computer and see how that goes...the description tells you exactly why your current approach will not work.
please make sure to read the description carefully before raising issues...
you are iterating on an list with a foreach loop while modifying it at the same time, this is very rarely a good thing to do, as it results in code that is hard to understand and a high probability of bugs. in some scenarios, you effectively delete some elements before they have been looped on, e.g. consider:
["two2", "one1"]
--> after the first iteration of your loop, this will be converted to["two2", "two2"]
."one1"
never gets iterated on.return
your result, not merelyprint
it, otherwise the tests will not find ittuple
, not alist