Ad
  • Custom User Avatar

    Advance cancer cell,should be cut out with adjacent cells if it can be done.

    I think this answers your concerns. If its possible you have to cut adjacent cells also. Only if cell is a advanced stage cancer.

  • Custom User Avatar

    Should I remove only next element or also previous element?

  • Default User Avatar
  • Custom User Avatar

    If you're logging it, you don't need to return. Or just return without logging, but in the end you'll need to return a boolean.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Issues are for problems in the kata, not problems in your solution.

  • Custom User Avatar

    ???

  • Default User Avatar

    I'm new to regex, but it seems that you don't allow for a reoccurrence of any letters or numbers.

    For example:
    "(?=.[a-z])" returns the first instance of any lowercase letter, but does not allow for duplicates.

    "(?=.*[a-z])" returns the first instance of any lowercase letter, but the asterisk symbol allows for 0 to infinite repititions.

    When I modified my code that passed all tests to remove the asterisk symbol so it look like yours, my test failed. Also, you should (from what I've read) place the "{6,}" after the "(?=.\d)" and add a "$" at the end to tell regex that the string is done (good habits to reduce errors when dealing with multiline comments if you ever do). Hopefully this helped!

  • Custom User Avatar

    Thats correct,function input is a string and output must be a string without "c" or "C" letter.When you removes "C" letter you must remove letters which are next to the letter if it possible(Important cells cant be removed).