LeetCode的第14题
2018-04-15 本文已影响0人
梦在原点
首先看一下题目要求
编写一个函数来查找字符串数组中的最长公共前缀。
在写代码的时候遇到了如下的问题
class Solution {
public:
string longestCommonPrefix(vector<string>& strs) {
}
};
这里的vector<string>& strs是我遇到的第一个问题,在之前的cpp程序里没有见过这样的参数所以在网上查找资料后得出结果