JAVA_LeetCode 3_Longest Substring Without Repeating Characters 풀이 class Solution { public int lengthOfLongestSubstring(String s) { // 배열에 해당 문자별 개수를 체크하고, 중복값을 체크해서 최대값을 산출한다. int[] arr = new int[128]; int cnt = 0, num = 0, temp = 0; for(int i = 0; i < s.length(); i++) { temp = s.charAt(i); while(arr[temp] > 0) { arr[s.charAt(num)]--; num++; } arr[temp]++; cnt = Math.max(cnt, i - num + 1); } return cnt; } } * 출처 https://leetcode.com/problems/longest-substring-without-repeating-characters...