-
99클럽 코테 스터디 8일차 TIL: 배열, 1286. Iterator for CombinationToday_I_Learned/Algorithm 2024. 6. 18. 00:21
문제
https://leetcode.com/problems/iterator-for-combination/description/
통과 여부
Fail
나의 접근법
- Backtrack 을 이용하여 CombinationIterator 생성자 호출 시 conbinationLength 길이만큼의 가능한 모든 조합을 미리 구하여 멤버 필드로 저장한다.
- next() 와 hasNext() 문자열 조합 멤버 필드로부터 요소를 하나씩 가져와 return 한다.
'Today_I_Learned > Algorithm' 카테고리의 다른 글