문자열 묶기 : 문제 링크
algorithm 헤더의 max() 함수 사용법
const T& max(const T& a, const T& b)
=> a, b 값을 비교하여 큰값을 return
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<string> strArr) {
vector<int> len(31, 0);
int answer = 0;
for(int i = 0; i < strArr.size(); ++i) {
len[strArr[i].size()]++;
answer = max(answer, len[strArr[i].size()]);
}
return answer;
}