Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有一个无限序列 b,如果 i 的二进制表示具有奇数个 1,则 b[i] = 1,否则 b[i] = 0。给定一个 0 和 1 的子序列,我需要找到匹配的起始索引(如果存在),或者说匹配不存在(如果不存在)。什么是有效的方法?