2019 카카오 신입 공채 1차 - 오픈채팅방
문제 풀기 : https://www.welcomekakao.com/learn/courses/30/lessons/42888 이 문제의 핵심은 uid이다. 하나의 uid에 하나의 닉네임이 매핑된다. 결국 마지막에 변경된 닉네임이 uid이 매핑된다. Change의 경우를 제외하고 Enter와 Leave의 경우만 한국 문자열로 대치하면서, uid에 매핑된 닉네임을 대입시키면 된다. import java.util.*; class Solution { public String[] solution(String[] record) { Map<String, String> users = new HashMap<>(); ArrayList<String> answer = new ArrayList<>(); int length = 0; for (int i = 0; i < record.length; i++) { String[] temp = record[i].split(" "); if (temp.length > 2) users.put(temp[1], temp[2]); if(!temp[0].equals("Change")) length++; ...