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.
我知道 KMP ( Knuth–Morris–Pratt ) 用于一维搜索。它可以应用于二维数据数组吗?还是有更高级的?
也许你可以在这个问题中找到一些东西。如果您展平您正在寻找的矩阵,您应该能够使用 KMP 进行一些调整。