The recursion is sort of a ‘divide and conquer’ style, it splits up while getting smaller (Tree data structure), and I want it to break completely if a violation is found, meaning break all the recursive paths, and return true. Is this possible?
Share
You could return an error code, or modify some global variable so that each recursive instance knows to “kill itself”.
Something of the sort.