Make Unreal REAL.
article thumbnail
Level 0. 문자열 묶기

 

 

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int solution(vector<string> strArr)
{
    int answer = 0;
    int *arr = new int[100'001]();

    for (string s : strArr)
        answer = max(answer, ++arr[s.length()]);

    delete[] arr;

    return answer;
}
profile

Make Unreal REAL.

@diesuki4

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

검색 태그