목록코테/LeetCode (18)
공부기록
395. Longest Substring with At Least K Repeating Characters
문제 https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/ 코드 못 풀어서 코드는 없다. 피드백 답지는 이거다. https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/discuss/170010/Java-O(n)-Solution-with-Detailed-Explanation-Sliding-Window 아이디어는 다음과 같다. 바깥 for는 한 번에 수용할 알파벳 종류 개수를 제한한다. 알파벳의 종류가 꽉 차지 않았다면 right로 이동한다. 해당 알파벳을 count++한다. 새로운 알파벳이 들어왔다면 알파벳 종..
코테/LeetCode
2021. 6. 1. 18:04
Next Permutation
문제 https://leetcode.com/problems/next-permutation/
코테/LeetCode
2021. 5. 29. 16:24