Recent posts

KMP演算法

KMP演算法 一個人能走的多遠,不在於他在順境時能走多快,而在於在逆境時多久能找到曾經的自己

LeetCode 2223. Sum of Scores of Built Strings

雙周賽75。 題目要的是longest common prefix,總覺得和KMP的longest prefix suffix有八成像,但是沒有成功做出來。後來才知道出題者想考z-function。