Keep it Real

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

공부/Algorithm 2

Prefix Sum 알고리즘

https://app.codility.com/programmers/lessons/5-prefix_sums/ n 개의 숫자가 있고, m 개의 쿼리에 각 쿼리마다 a 인덱스부터 b 인덱스까지의 숫자의 합을 구하는 문제 숫자들의 합산을 저장하는 배열을 선언하고 n 개의 숫자 배열을 순회하며 합산을 저장한다. a 부터 b 까지의 숫자들의 합은 합산 배열의 b 인덱스 에서 a - 1 인덱스 값을 뺀 결과값이다. prefix sum 알고리즘을 이용하면 m * n 의 시간 복잡도를 m + n 으로 줄여준다.

공부/Algorithm 2023.05.06

Max Slice 알고리즘

https://codility.com/media/train/7-MaxSlice.pdf Prefix Sum 을 이용하는 방법은 O(n^2) 의 시간 복잡도가 걸린다. O(n) 의 시간 복잡도가 걸리는 다른 방식이 있다. 9.3. Solution with O(n) time complexity This problem can be solved even faster. For each position, we compute the largest sum that ends in that position. If we assume that the maximum sum of a slice ending in position i equals max_ending, then the maximum slice ending in posi..

공부/Algorithm 2023.05.06
이전
1
다음
더보기
프로필사진

  • 분류 전체보기
    • 업무
    • 이직
    • Personal
    • 공부
      • C++ \C#
      • Unreal Engine 4
      • Data Structure
      • 기타
      • Rendering
      • Algorithm
      • Unity
      • 수학
    • 작업물
      • Portfolio
      • DirectX 11
    • 취미
      • Programming Problems

Tag

UBT, 백준 2677번, Xlint:deprecation, UE4 patch, ue4 plugin, unity #android #waitfor, ue4 plugin packaging error, UE4 delegate, pak file mount, ue4 assetmanager, UE4, ue4 asset redirector, LoadTextFileFromPlatformPackage, uses or overrides a deprecated API, ue4 ios 파일 읽기, UE4 module, C++, ue4 aos 파일 읽기, Unreal Build Tool, ue4 plugin dependency,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바