Repository navigation
fix: 공간 복잡도 판정에 재귀 스택과 라이브러리 내부 공간 포함 - #69
Merged
DaleSeo merged 2 commits intoNov 21, 2026
Merged
Conversation
복잡도 분석 프롬프트에 공간 복잡도 계산 기준이 없어 std::sort 의 재귀 스택(O(log n))을 누락하고 O(1) 을 정답으로 판정하던 문제를 수정한다. - complexity-analysis SYSTEM_PROMPT 에 보조 공간 기준, 재귀 호출 스택, 언어별 표준 정렬의 내부 공간, 숨은 할당 포함 규칙 추가 - 일반 리뷰 프롬프트에도 동일 기준 한 줄 추가 Closes DaleStudy#68
DaleSeo
approved these changes
Nov 21, 2026
liza0525
reviewed
Nov 22, 2026
| - 호출하는 **표준 라이브러리의 내부 공간**도 포함합니다. 새 변수를 선언하지 않았다는 이유로 O(1) 로 판정하지 마세요. | ||
| 예: C++ \`std::sort\` 는 재귀 스택으로 O(log n), Python \`sorted()\` 는 O(n). | ||
| - 문자열 슬라이싱/복사, \`split\`, 스프레드 등 숨은 할당도 포함합니다. | ||
|
|
There was a problem hiding this comment.
기존의 시스템 프롬프트에 조건을 하나 더 추가해주신 것이군요.
내용에는 이견이 없고, 현재 스터디의 자동화를 어떻게 관리하고 계신지 구경도 하게 된 경험이었습니다!
개선해주셔서 감사합니다 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
복잡도 분석 프롬프트에 공간 복잡도를 어떻게 셀지에 대한 기준이 없어서,
std::sort로 정렬만 하는 풀이를 O(1)로 판정하는 문제가 있었습니다 (introsort 재귀 스택 때문에 실제로는 O(log n)). 그래서SYSTEM_PROMPT에 공간 복잡도 판정 기준 섹션을 추가했습니다. 보조 공간 기준으로 판정하고, 재귀 호출 스택과 언어별 표준 정렬의 내부 공간, 문자열 슬라이싱 같은 숨은 할당까지 포함하도록 했습니다. 일반 리뷰 프롬프트에도 같은 기준을 한 줄 넣었습니다.Closes #68