14. Longest Common Prefix
1.問題
2.想法
提問
function header, parameter
test input
說明想法
用vector<int> 儲存每個string各字母出現的次數, 當相同字母的出現次數與字串數量相同時, increment + 1
測試計算複雜度: O(n)
3.程式碼
Last updated
提問
function header, parameter
test input
說明想法
用vector<int> 儲存每個string各字母出現的次數, 當相同字母的出現次數與字串數量相同時, increment + 1
測試計算複雜度: O(n)
Last updated