use racing pointers to find the split point and do recursion

last solution is sort of cheating