Node graph clone test for both direct and undirect graphs
Update Manacher algorithm to expand a palindrome only when necessary.