/* 自定義代碼塊樣式 */

herrDeng網內搜尋

自訂搜尋

Ads

2026年3月28日 星期六

C++UnionFind與matrix分析解難題Leetcode 2573 Find the String with LCP


解難題Leetcode 2573. Find the String with LCP,其實重點是lcp非常特殊的矩陣,只要搞定lcp各項的關聯,如對稱性,對角線上值-1等特性,應該能解出。會先用Union-Find主要是其解法可針對更為廣義的題目,要快就用貪婪。
Related Posts Plugin for WordPress, Blogger...

熱門文章