Separate the Numbers

  • + 0 comments

    I have no clue in whos vocab is this a Basic - Easy questions. This is more like a medium question and I would say a harder one of that.

    I have used a backtracking kind approach. Try diff length numbers to begin the recursive calls, then check if the next number we can come up with is +1 of previous. If we find a number like that we have another recursive call.| If the number is too big we can stop and return false. If the starting number size is already more than half the digits count we can also stop.