posting: js자료구조강의정리-빅오표기법 - #73
Conversation
Summary of ChangesHello, 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
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
|
@gemini review |
| title: "Big O Notation - 시간복잡도와 공간복잡도" | ||
| excerpt: "자료구조, 알고리즘 강의내용 정리" | ||
| coverImage: "/assets/algorithms/JS-자료구조/cover.png" | ||
| date: "2026-03-16T10:00:00" |
| | concat | O(n) | | | ||
| | slice | O(n) | | | ||
| | splice | O(n) | | | ||
| | sort | O(n log n) | | | ||
| | forEach / map / filter / reduce | O(n) | | |
| | 연산 | 복잡도 | | ||
| |------|--------| | ||
| | 삽입 | O(1) | | ||
| | 삭제 | O(1) | | ||
| | 접근 | O(1) | | ||
| | 탐색 (값 검색) | O(n) | | ||
| | Object.keys() | O(n) | | ||
| | Object.values() | O(n) | | ||
| | Object.entries() | O(n) | | ||
| | hasOwnProperty | O(1) | |
| title: "Big O Notation - 시간복잡도와 공간복잡도" | ||
| excerpt: "자료구조, 알고리즘 강의내용 정리" | ||
| coverImage: "/assets/algorithms/JS-자료구조/cover.png" | ||
| date: "2026-03-16T10:00:00" |
|
|
||
| ```javascript | ||
| // O(2n) → O(n) | ||
| function printPairs(arr) { |
There was a problem hiding this comment.
| | concat | O(n) | | | ||
| | slice | O(n) | | | ||
| | splice | O(n) | | | ||
| | sort | O(n log n) | | | ||
| | forEach / map / filter / reduce | O(n) | | |
There was a problem hiding this comment.
배열 성능 표에서 일부 연산(concat, slice, splice, sort, forEach 등)에 대한 '이유' 항목이 비어있습니다. 독자의 이해를 돕기 위해 각 연산의 복잡도에 대한 이유를 간략하게 추가하는 것을 제안합니다.
| | 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) | 모든 요소를 한 번씩 순회 | |
No description provided.