Meta Interview Question

similar to palindrone II in leetcode