假设您正在读取字符流,则在您第一次出现回文时,该函数应该返回.
回文的长度应为偶数.
时间复杂度的要求是O(N).
例:
algorithm palindrome
algorithm ×1
palindrome ×1