Algorithm Kadane’s Algorithm

알고리듬 Kadane's Algorithm을 알아보겠습니다.

카데인의 알고리듬은 배열이 있을 때, 부분 합의 최대가 되는 부분을 구하는 알고리듬입니다.

[1, -1, 0, 5, -7, 9, -8, -11] 이런 배열이 있을 때, 최대가 되는 구간은 무엇일까요?
아마도 [9] 구간에서 가장 큰 값 9이 나올 겁니다.

이것을 프로그래밍 알고리듬으로 해결해 봅시다.






끝.


카테고리: Algorithm

댓글

이 블로그의 인기 게시물

Python urllib.parse.quote()

KiCad 시작하기 4 (기존 회로도 수정 및 추가)

Android Compose Coil library

KiCad 시작하기 1 (회로도 만들기)

Android Notification with Full Screen

iOS Swift callAsFunction

Android Custom IME(Input method editor) 만들기

iOS Error Undefined symbol Testing.Trait

Android Compose automation for getting localized images to use on Play Store app image

tensorflow tf.expand_dims()