Skip to content

posting: js자료구조강의정리-빅오표기법 - #73

Merged
youngduck merged 2 commits into
mainfrom
claude/posting-big-o-notation-Lu2uX
Mar 17, 2026
Merged

posting: js자료구조강의정리-빅오표기법#73
youngduck merged 2 commits into
mainfrom
claude/posting-big-o-notation-Lu2uX

Conversation

@youngduck

Copy link
Copy Markdown
Owner

No description provided.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 빅오 표기법에 대한 포괄적인 문서를 추가하여 알고리즘의 시간 및 공간 복잡도 분석에 대한 기본적인 이해를 제공합니다. JavaScript를 중심으로 한 구체적인 예시와 함께 배열 및 객체와 같은 일반적인 자료구조의 성능 특성을 설명하여, 개발자들이 더 효율적이고 확장 가능한 코드를 작성하는 데 필요한 지식을 습득할 수 있도록 돕습니다.

Highlights

  • 빅오 표기법 설명 추가: 알고리즘의 성능을 분석하는 빅오 표기법에 대한 상세한 설명을 추가했습니다. 시간 복잡도와 공간 복잡도의 개념, 계산 규칙, 그리고 다양한 복잡도 종류를 JavaScript 예시와 함께 다룹니다.
  • JavaScript 자료구조 성능 분석: JavaScript의 핵심 자료구조인 배열(Array)과 객체(Object)의 주요 연산에 대한 시간 복잡도를 정리하여, 각 연산의 효율성을 이해하고 최적의 자료구조를 선택하는 데 도움을 줍니다.
Changelog
  • _algorithms/JS-자료구조/big-o-notation.md
    • 빅오 표기법, 시간 복잡도, 공간 복잡도에 대한 상세한 설명을 담은 새 문서를 추가했습니다.
    • 다양한 빅오 복잡도 유형에 대한 JavaScript 코드 예시를 포함했습니다.
    • JavaScript 배열 및 객체 연산의 성능 분석을 제공했습니다.
Activity
  • 아직 이 PR에 대한 사람의 활동은 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@youngduck

Copy link
Copy Markdown
Owner Author

@gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 Big O 표기법에 대한 새로운 문서를 추가합니다. 내용이 잘 정리되어 있고 유용합니다. 다만, 문서의 완성도를 높이기 위해 몇 가지 개선점을 제안합니다. 게시글 메타데이터의 날짜가 미래로 설정된 부분을 확인하고, 배열 및 객체 성능 표에 각 연산의 복잡도에 대한 설명을 보충하면 더 좋은 문서가 될 것 같습니다.

title: "Big O Notation - 시간복잡도와 공간복잡도"
excerpt: "자료구조, 알고리즘 강의내용 정리"
coverImage: "/assets/algorithms/JS-자료구조/cover.png"
date: "2026-03-16T10:00:00"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

게시글의 날짜가 2026-03-16으로 미래 시점으로 설정되어 있습니다. 의도된 설정이 아니라면 실제 작성일로 수정하는 것이 좋겠습니다. 미래 날짜는 포스트 정렬이나 표시에 예기치 않은 문제를 일으킬 수 있습니다.

Comment on lines +182 to +186
| concat | O(n) | |
| slice | O(n) | |
| splice | O(n) | |
| sort | O(n log n) | |
| forEach / map / filter / reduce | O(n) | |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

배열 성능 표의 concat, slice, splice, sort, forEach / map / filter / reduce 연산에 대한 '이유' 항목이 비어있습니다. 각 연산의 복잡도에 대한 이유를 간략하게 추가하면 문서를 이해하는 데 더 도움이 될 것 같습니다. 예를 들어, concat은 '새 배열을 생성하여 요소를 복사하기 때문'과 같이 설명할 수 있습니다.

Comment on lines +198 to +207
| 연산 | 복잡도 |
|------|--------|
| 삽입 | O(1) |
| 삭제 | O(1) |
| 접근 | O(1) |
| 탐색 (값 검색) | O(n) |
| Object.keys() | O(n) |
| Object.values() | O(n) |
| Object.entries() | O(n) |
| hasOwnProperty | O(1) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

객체 성능 표에는 '이유' 열이 없습니다. 배열 성능 표와 일관성을 맞추고, 각 연산의 시간 복잡도에 대한 이유를 설명하기 위해 '이유' 열을 추가하는 것을 고려해 보세요. 예를 들어, 삽입/삭제/접근이 O(1)인 이유는 '해시 함수를 통해 키에 직접 접근하기 때문'이라고 설명할 수 있습니다.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

안녕하세요. Big O 표기법에 대한 강의 내용을 정리한 문서를 추가하는 PR을 리뷰했습니다. 내용에 몇 가지 수정하면 좋을 부분이 있어 코멘트를 남겼습니다. 확인 부탁드립니다.

title: "Big O Notation - 시간복잡도와 공간복잡도"
excerpt: "자료구조, 알고리즘 강의내용 정리"
coverImage: "/assets/algorithms/JS-자료구조/cover.png"
date: "2026-03-16T10:00:00"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

게시물의 날짜가 미래 시점(2026-03-16)으로 설정되어 있습니다. 의도하신 설정이 아니라면 현재 날짜나 과거 날짜로 수정해야 게시물이 정상적으로 노출될 수 있습니다. 오타일 가능성이 있어 보여 확인을 요청드립니다.


```javascript
// O(2n) → O(n)
function printPairs(arr) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

함수 이름이 printPairs이지만, 실제로는 배열의 모든 요소를 두 번 출력하고 있습니다. 이는 쌍(pair)을 출력하는 동작(보통 O(n²) 복잡도)과 혼동을 줄 수 있습니다. 예를 들어 108라인의 printAllPairs 함수는 실제로 쌍을 출력합니다. 함수의 동작을 더 명확하게 나타내는 이름(예: printItemsTwice)으로 변경하는 것을 고려해 보세요.

Suggested change
function printPairs(arr) {
function printItemsTwice(arr) {

Comment on lines +182 to +186
| concat | O(n) | |
| slice | O(n) | |
| splice | O(n) | |
| sort | O(n log n) | |
| forEach / map / filter / reduce | O(n) | |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

배열 성능 표에서 일부 연산(concat, slice, splice, sort, forEach 등)에 대한 '이유' 항목이 비어있습니다. 독자의 이해를 돕기 위해 각 연산의 복잡도에 대한 이유를 간략하게 추가하는 것을 제안합니다.

Suggested change
| concat | O(n) | |
| slice | O(n) | |
| splice | O(n) | |
| sort | O(n log n) | |
| forEach / map / filter / reduce | O(n) | |
| concat | O(n) | 새 배열 생성 후 요소 복사 |
| slice | O(n) | 새 배열 생성 후 요소 복사 |
| splice | O(n) | 요소 제거/추가 후 인덱스 재정렬 |
| sort | O(n log n) | 효율적인 정렬 알고리즘 사용 (엔진마다 다름) |
| forEach / map / filter / reduce | O(n) | 모든 요소를 한 번씩 순회 |

@youngduck
youngduck merged commit c85b98d into main Mar 17, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants