Ad
  • Custom User Avatar

    The method returns a string containing a regular expression. For understanding, look at the "Sample Tests" section under the task.

  • Default User Avatar

    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.

  • Custom User Avatar

    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?