LeetNote
Categories
Problems
Patterns
🔍 Search
Ladders
Dashboard
🌙
☀️
Categories
/
Patterns
/
字串比對
🔤 Patterns · 字串・位元・數學
字串比對
String Matching
2 題(2 題以此為主技法)
🎯 何時用
在文字中找模式、最長前後綴、週期。
🧩 模板心法
KMP 用 failure 函式跳過重比;Rabin-Karp 滾動雜湊;Z-function 求最長共同前綴。
Easy
2 題
#572
Subtree of Another Tree
主
🌳 Trees
★★★★★
#28
Find The Index of The First Occurrence in a String
主
🗂️ Arrays & Hashing
★★★
★★