JAVA_LeetCode 3582_Generate Tag for Video Caption 풀이 class Solution { public String generateTag(String caption) { if(caption == null) return "#"; // 공백 기준으로 단어 분리 String[] words = caption.trim().split("\\s+"); StringBuilder sb = new StringBuilder("#"); int cnt = 0; for(int i = 0; i < words.length; i++){ // 특수문자 제거 및 영문자만 추출 String cleanWord = words[i].replaceAll("[^a-zA-Z]", ""); if(cleanWord.isEmpty()) continue; // 첫 번째 단어는 전체 소문자 if(cnt == 0) sb.append(cleanWord.toLowerCase()); else{ // 첫 글자 대...