b649: 在字符串組中找出最長的公共前綴
Tags :
Accepted rate : 88人/90人 ( 98% ) [非即時]
評分方式:
Tolerant

最近更新 : 2026-02-25 10:31

Content

通過編寫一個函數,插住字符串組中的最長公共前綴,如果不存在,則返回“None”

Input
Output
Sample Input #1
apple,ape,apt
Sample Output #1
ap
Sample Input #2
cat,snake,dog
Sample Output #2
None
測資資訊:
記憶體限制: 64 MB
不公開 測資點#0 (50%): 1.0s , <1K
不公開 測資點#1 (50%): 1.0s , <1K
Hint :
Tags:
出處:
[管理者:
zkzhang@g.pu... (張振科老師)
]


ID User Problem Subject Hit Post Date
沒有發現任何「解題報告」