1763 https://leetcode.com/problems/longest-nice-substring/ easy 로 분류되었는데 medium 하위정도 되는것같다. O(n^2)으로 모든 경우를 탐색한다. 길게 좌우에서 조여오면서 탐색한다. cur_s는 l과 r이 움직임에 따라 만들어지는 부분적인 문자열이고, cur_s내의 모든 문자가 대문자와 소문자가 cur_s내에 존재해야 하면서 이게 이전 길이보다 더 길면 바꿔준다. class Solution: def longestNiceSubstring(self, s: str) -> str: len_s = len(s) l = 0 ret = '' while l < len_s: r = len_s - 1 while l < r: cur_s = s[l:r+1] if all(..