Title: 누적합 알고리즘 · Issue #6 · SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8 · GitHub
Open Graph Title: 누적합 알고리즘 · Issue #6 · SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8
X Title: 누적합 알고리즘 · Issue #6 · SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8
Description: 누적합 알고리즘 (Prefix Sum Algorithm) 누적합 알고리즘은 구간합을 빠르게 계산하기 위해 사용되는 기법이다. 주어진 배열의 구간합을 O(1) 시간 복잡도로 구할 수 있다. 이를 위해 먼저 누적합 배열을 생성 기본 개념 정의: 누적합 배열은 원래 배열의 각 원소까지의 합을 저장한 배열 목적: 구간합을 빠르게 구하기 위해 사용됌. 사용법: 특정 구간 [A, B]의 합을 구할 때, B까지의 누적합에서 A-1까지...
Open Graph Description: 누적합 알고리즘 (Prefix Sum Algorithm) 누적합 알고리즘은 구간합을 빠르게 계산하기 위해 사용되는 기법이다. 주어진 배열의 구간합을 O(1) 시간 복잡도로 구할 수 있다. 이를 위해 먼저 누적합 배열을 생성 기본 개념 정의: 누적합 배열은 원래 배열의 각 원소까지의 합을 저장한 배열 목적: 구간합을 빠르게 구하기 위해 사용됌. 사용법:...
X Description: 누적합 알고리즘 (Prefix Sum Algorithm) 누적합 알고리즘은 구간합을 빠르게 계산하기 위해 사용되는 기법이다. 주어진 배열의 구간합을 O(1) 시간 복잡도로 구할 수 있다. 이를 위해 먼저 누적합 배열을 생성 기본 개념 정의: 누적합 배열은 원래 배열의 각 원소까지의 합을 저장한 배열 목적: 구간합을 빠르게 구하기 위해 사용됌. 사용법:...
Opengraph URL: https://github.com/SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8/issues/6
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"누적합 알고리즘","articleBody":"# 누적합 알고리즘 (Prefix Sum Algorithm)\r\n\r\n- 누적합 알고리즘은 구간합을 빠르게 계산하기 위해 사용되는 기법이다.\r\n- 주어진 배열의 구간합을 O(1) 시간 복잡도로 구할 수 있다. 이를 위해 먼저 누적합 배열을 생성\r\n\r\n## 기본 개념\r\n- **정의**: 누적합 배열은 원래 배열의 각 원소까지의 합을 저장한 배열\r\n- **목적**: 구간합을 빠르게 구하기 위해 사용됌.\r\n- **사용법**: 특정 구간 [A, B]의 합을 구할 때, B까지의 누적합에서 A-1까지의 누적합을 뺍니다.\r\n\r\n## 예시\r\n- 주어진 배열: [1, 2, 3, 4, 5]\r\n- 누적합 배열: [1, 3, 6, 10, 15]\r\n\r\n\r\n1. **방법 1**:\r\n - 각 단계별로 누적합을 구합니다.\r\n - 예시:\r\n ```\r\n 1\r\n 1 + 2\r\n 1 + 2 + 3\r\n 1 + 2 + 3 + 4\r\n 1 + 2 + 3 + 4 + 5\r\n ```\r\n\r\n2. **방법 2 (더 효율적인 방법)**:\r\n - 이전 단계의 누적합에 현재 원소를 더합니다.\r\n - 예시:\r\n ```\r\n 1\r\n 1 + 2\r\n 3 + 3\r\n 6 + 4\r\n 10 + 5\r\n ```\r\n\r\n## 구간합 계산 방법\r\n- **구간합 [A, B] 계산**:\r\n 1. 누적합 배열을 구합니다.\r\n 2. 구간합은 B까지의 누적합에서 A-1까지의 누적합을 뺀다.\r\n - 수식: `sum(A, B) = prefix_sum[B] - prefix_sum[A-1]`","author":{"url":"https://github.com/hnjgg","@type":"Person","name":"hnjgg"},"datePublished":"2024-07-30T06:00:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6/SquirtlesAlgorithmStudyS8/issues/6"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6b13ef83-f3ea-76fe-8c93-bca48bab958b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E28E:2C5DE1:3530A60:496999E:6977CBED |
| html-safe-nonce | c3220ef429cebbe8c529543c817e9dfe45e95419967af78b59761824cf250683 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjhFOjJDNURFMTozNTMwQTYwOjQ5Njk5OUU6Njk3N0NCRUQiLCJ2aXNpdG9yX2lkIjoiODExOTI0MDI2NzI4MzI4NzAyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d62acc53f5098f1cf48e76852fa68ed8039e7d049a0559566767151b175ea35a |
| hovercard-subject-tag | issue:2436967306 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8/6/issue_layout |
| twitter:image | https://opengraph.githubassets.com/07923719b90c55366d719487fb93a1bf06defedbbf56e2dce6382a12fbcdcff0/SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8/issues/6 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/07923719b90c55366d719487fb93a1bf06defedbbf56e2dce6382a12fbcdcff0/SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8/issues/6 |
| og:image:alt | 누적합 알고리즘 (Prefix Sum Algorithm) 누적합 알고리즘은 구간합을 빠르게 계산하기 위해 사용되는 기법이다. 주어진 배열의 구간합을 O(1) 시간 복잡도로 구할 수 있다. 이를 위해 먼저 누적합 배열을 생성 기본 개념 정의: 누적합 배열은 원래 배열의 각 원소까지의 합을 저장한 배열 목적: 구간합을 빠르게 구하기 위해 사용됌. 사용법:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hnjgg |
| hostname | github.com |
| expected-hostname | github.com |
| None | 173f8c2eae2e017de550dd28a9ea88ad5c1e52c70df7ea05bcd820330b3b2fec |
| turbo-cache-control | no-preview |
| go-import | github.com/SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8 git https://github.com/SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8.git |
| octolytics-dimension-user_id | 78294988 |
| octolytics-dimension-user_login | SquirtlesAlgorithmStudy |
| octolytics-dimension-repository_id | 777265130 |
| octolytics-dimension-repository_nwo | SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 777265130 |
| octolytics-dimension-repository_network_root_nwo | SquirtlesAlgorithmStudy/SquirtlesAlgorithmStudyS8 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7b19554cad55a536fac18eeedb416dd87c37b1f5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width