I want to implement an algorithm that finds the longest run of integers in an array recursively, using divide and conquer.
I made a sequential algorithm that makes sense, and I think I could do it using recursion. However, I am confused about how I would use divide and conquer, as I believe that would break up the run.
Example:
[1,2,3,4,4,4,3,3]
The first 4 would break off from the rest of the 4s, if the list was divided in half.
I already created the base case, but am unsure where to go from there.
Base case:
if(len(myarray) == 0):
return 0