본문 바로가기

algorithm

[Algorithm] 2019 카카오 블라인드 테스트 문제풀이 - 오픈채팅방 [Algorithm] 2019 카카오 블라인드 테스트 문제풀이 - 오픈채팅방 문제 카카오톡 오픈채팅방에서는 친구가 아닌 사람들과 대화를 할 수 있는데, 본래 닉네임이 아닌 가상의 닉네임을 사용하여 채팅방에 들어갈 수 있다. 신입사원인 김크루는 카카오톡 오픈 채팅방을 개설한 사람을 위해, 다양한 사람들이 들어오고, 나가는 것을 지켜볼 수 있는 관리자창을 만들기로 했다. 채팅방에 누군가 들어오면 다음 메시지가 출력된다. "[닉네임]님이 들어왔습니다." 채팅방에서 누군가 나가면 다음 메시지가 출력된다. "[닉네임]님이 나갔습니다." 채팅방에서 닉네임을 변경하는 방법은 다음과 같이 두 가지이다. 채팅방을 나간 후, 새로운 닉네임으로 다시 들어간다. 채팅방에서 닉네임을 변경한다. 닉네임을 변경할 때는 기존에 채팅.. 더보기
[Python] LeetCode 문제풀이 :: 344. Reverse String 리트코드 344번 문제풀이 https://leetcode.com/problems/reverse-string/ Reverse String - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, you must.. 더보기