Phone List (排序+字典樹)

Phone List (排序+字典樹) 題目大意:給出多組字符串,問是否有某一個字符串是另外一個字符串的前綴,有的話輸出NO,沒有輸出YES。php 解題思路:把字符串按照長度從大到小排序一下,而後插入,看此串是否出現過。ios Code:web #include <iostream> #include <cstdio> #include<cmath> #include <cstring> #in
相關文章
相關標籤/搜索