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.
The method returns a string containing a regular expression. For understanding, look at the "Sample Tests" section under the task.
The task is to construct and return a regular expression pattern, that will match a binary number only if it is divisible by 7. The numbers are never passed to the function to be implemented.
For example, if the task was to match binary numbers divisible by 2 (which is trivial), you would return:
Pattern.compile("^[01]*0$")
. This task is much more complex, of course.Hello, I'm a little confused about what this kata requires to do. I understood the task as checking a binary number for divisibility by 7, but the function that is given to us initially does not have any number at the input with which the code will work. Please explain where we get this input number from and what does this kata want from the user in general?