Took a few days to resolve the Palindrome minCut, could still be
optimized by two way BFS.