• Skip to primary navigation
  • Skip to content
  • Skip to footer
fullfish fullfish 일상을 더 가볍게 만드는 앱을 만듭니다
  • Apps
  • Blog

    fullfish

    just studying

    • 전주

    징검다리 건너기(이진 탐색 예제)

    def solution(stones, k):
        low, high = 1, max(stones)
        
        def can_cross(n):
            count = 0
            for stone in stones:
                if n >= stone:
                    count += 1
                    if count == k:
                        return False
                else:
                    count = 0
            return True
    
        while high > low:
            mid = (low + high) // 2
            if can_cross(mid):
                low = mid + 1
            else:
                high = mid
        return low
    

    카테고리: 코딩 테스트, 프로그래머스 level2

    업데이트: October 1, 2025

    공유하기

    Twitter Facebook LinkedIn
    이전 다음

    참고

    fullweight 개인정보 처리방침 [ Project / fullweight ]

    https://github.com/full-fish/fullweight/blob/main/PRIVACY_POLICY.md

    멀티캠퍼스 KDT 데이터 분석가 최종 프로젝트 6차 수행일지 [ Project / multicampus-project ]

    [6차 프로젝트 수행일지_Tensor.docx

    멀티캠퍼스 KDT 데이터 분석가 최종 프로젝트 5차 수행일지 [ Project / multicampus-project ]

    [5차 프로젝트 수행일지_Tensor.docx

    멀티캠퍼스 KDT 데이터 분석가 최종 프로젝트 4차 수행일지 [ Project / multicampus-project ]

    [4차 프로젝트 수행일지_Tensor.docx

    • 팔로우:
    • 피드
    © 2026 fullfish. Powered by Jekyll & Minimal Mistakes.