Skip to content

refactor: 자료구조 문제 개선 및 챕터, 유닛 SQL 분리(#288)#289

Merged
sukangpunch merged 1 commit intodevfrom
refactor/288-update-problem-set
Jan 9, 2026
Merged

refactor: 자료구조 문제 개선 및 챕터, 유닛 SQL 분리(#288)#289
sukangpunch merged 1 commit intodevfrom
refactor/288-update-problem-set

Conversation

@xunxxoie
Copy link
Member

@xunxxoie xunxxoie commented Jan 9, 2026

📋 이슈 번호

🛠 구현 사항

🤔 추가 고려 사항

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 자료구조 학습 단원의 초기 데이터 추가: 배열, 연결리스트, 스택 및 큐, 트리, 이진탐색트리, 힙, 트라이, 균형이진탐색트리, 해시테이블, 그래프
    • 각 단원별로 강의, 문제, 선택지, 정답 데이터 구성

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

개요

데이터 구조 관련 10개 단원(배열, 연결리스트, 스택과 큐, 트리 등)에 대한 포괄적인 SQL 시드 데이터를 추가합니다. 각 단원별로 강의, 문제, 선택지, 답변 테이블에 1,400여 줄의 INSERT 문을 삽입하여 학습 콘텐츠를 초기화합니다.

변경사항

응집도 / 파일 변경 요약
장 및 단원 설정
src/main/resources/sql/chapter.sql, src/main/resources/sql/unit.sql
5개 장에 대한 기본 정보 추가 및 단원 INSERT 문 재구성. 마지막 줄 문장 부호 정규화 및 Chapter 5(운영체제) 단원 신규 추가
데이터 구조 단원 시드 데이터
src/main/resources/sql/problem/data-structure/unit01_배열.sql, unit02_연결리스트.sql, unit03_스택과큐.sql, unit04_트리기본.sql, unit05_이진트리와이진탐색트리.sql, unit06_힙과우선순위큐.sql, unit07_트라이.sql, unit08_균형이진탐색트리.sql, unit09_해시테이블.sql, unit10_그래프.sql
각 단원별로 3개 강의 블록과 강의당 6개 문제, 선택지, 정답 데이터 삽입. 객관식/주관식 문제 타입 포함, 정답 플래그(is_answer) 및 설명문 매핑 구성. 총 ~1,700줄의 INSERT 문

예상 코드 리뷰 소요시간

🎯 3 (보통) | ⏱️ ~20분

관련 가능성 있는 PR

권장 검토자

  • sukangpunch

마법의 시

🐰 데이터의 정원을 가꾸며
문제들을 한 줄씩 심네요
배열부터 그래프까지 쭉
단원의 숲이 자라나고
학습의 나무가 뿌리를 내립니다 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 주요 변경 사항(자료구조 문제 개선 및 챕터, 유닛 SQL 분리)을 명확하게 설명하고 있으며, raw_summary의 파일 변경 사항들과 직접적으로 관련되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Unit Test Results

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit 0b2c929.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Fix all issues with AI agents
In @src/main/resources/sql/chapter.sql:
- Around line 3-8: The INSERT into chapter currently hardcodes ids which can
cause primary key conflicts when re-running the script; modify the INSERT into
chapter to either omit the id column so the DB assigns it (use DEFAULT/serial),
or keep explicit ids but add PostgreSQL conflict handling such as appending an
ON CONFLICT (id) DO NOTHING or ON CONFLICT (id) DO UPDATE SET ... clause to the
INSERT, and consider wrapping the operation in a transaction to ensure
consistency; locate the INSERT statement that targets the chapter table to apply
the chosen change.

In @src/main/resources/sql/problem/data-structure/unit06_힙과우선순위큐.sql:
- Around line 17-19: Two consecutive problem rows with IDs 93 and 94 have
identical instruction and content text causing duplication; update one row
(Problem ID 94) so its instruction/content clearly targets the alternative
option set (e.g., reference "최대 힙과 최소 힙 중 어느 것이 옳은가?" or explicitly mention "최소
힙에 대한 설명으로 옳은 것은?") to differentiate it from Problem ID 93 which covers the
other heap type; ensure the tuple for Problem ID 94 reflects the corrected
prompt and any adjusted choice wording so each problem uniquely corresponds to
its intended option set.

In @src/main/resources/sql/problem/data-structure/unit09_해시테이블.sql:
- Line 181: Remove the trailing comma inside the SQL VALUES string literal
'O(n),선형시간,선형 시간,linear time,' so the answer content ends with 'linear time'
(i.e., update the VALUES tuple entry to remove the final comma from that quoted
string).
- Line 149: There's a typo in the comment text on line 149 where "crsize 제한이 없다"
should read "크기 제한이 없다"; update the description to replace the incorrect token
"crsize" with the correct Korean word "크기" (look for the exact phrase "crsize
제한이 없다" in the SQL file and change it to "크기 제한이 없다") so the explanation reads
correctly.

In @src/main/resources/sql/problem/data-structure/unit10_그래프.sql:
- Around line 64-65: The VALUES tuple for id 53 contains a duplicated token
"node" in the answer string ('정점,vertex,노드,node,vertices,node'); update that
tuple (the VALUES(...) entry with leading 53) to remove the duplicate so the
token list becomes unique (e.g., '정점,vertex,노드,node,vertices') and preserve the
same comma-separated formatting and surrounding quotes.
- Around line 182-183: Normalize Big-O notation by replacing lowercase 'o' with
uppercase 'O' in the SQL content fields: for example change 'o(v+e),o(v + e)' in
unit10_그래프.sql (the VALUES tuple containing that string) to 'O(v+e),O(v + e)';
similarly update 'o(m)' entries in unit07_트라이.sql (lines containing 'o(m),선형
시간,...') to 'O(m)' and 'o(log n)' in unit08_균형이진탐색트리.sql to 'O(log n)'; scan
other problem files for any content fields using lowercase 'o(' and replace with
'O(' to ensure project-wide consistency.
🧹 Nitpick comments (2)
src/main/resources/sql/problem/data-structure/unit08_균형이진탐색트리.sql (1)

63-67: Big O 표기법 일관성 개선 권장

Answer 테이블의 content 컬럼에서 시간 복잡도를 'o(log n)'와 같이 소문자 'o'로 표기하고 있습니다. 표준 Big O 표기법은 대문자 'O'를 사용하므로 'O(log n)'로 통일하는 것을 권장합니다.

다른 SQL 파일들에서도 동일한 패턴이 사용되고 있어 전체적으로 일관성을 유지하기 위해 모든 파일에서 수정하는 것이 좋습니다.

♻️ 제안하는 수정안
 INSERT INTO answer (id, problem_id, content, explanation)
-VALUES (41, 122, '1',
+VALUES (41, 122, '1',
         'AVL 트리는 모든 노드의 왼쪽과 오른쪽 서브트리의 높이 차이를 최대 1로 유지한다. 이를 통해 트리의 높이를 O(log n)으로 유지하여 모든 연산이 효율적으로 수행된다.'),
-       (42, 125, 'o(log n),로그 시간,logarithmic time',
+       (42, 125, 'O(log n),로그 시간,logarithmic time',
         'AVL 트리는 균형을 유지하므로 트리의 높이가 O(log n)이다. 따라서 탐색, 삽입, 삭제 모든 연산의 시간 복잡도가 O(log n)이다.');

Also applies to: 122-126

src/main/resources/sql/problem/data-structure/unit02_연결리스트.sql (1)

107-108: 답안 형식의 일관성 개선 권장

Line 107의 answer content가 다소 불규칙합니다: '일치하지,않음,다름,불일치,different,not equal,같지 않음'

"일치하지"는 불완전한 표현이며, 다른 답안들과 비교했을 때 형식이 일관되지 않습니다. 더 명확한 답안 옵션을 사용하는 것이 좋습니다.

♻️ 제안하는 개선
-       (10, 29, '일치하지,않음,다름,불일치,different,not equal,같지 않음',
+       (10, 29, '일치,일치하지 않음,다름,불일치',

영문 표현은 한국어 교육 컨텍스트에서 불필요할 수 있으므로 제거를 고려해보세요.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a04cd4 and 0b2c929.

📒 Files selected for processing (14)
  • src/main/resources/sql/chapter.sql
  • src/main/resources/sql/problem/data-structure/unit01_배열.sql
  • src/main/resources/sql/problem/data-structure/unit02_연결리스트.sql
  • src/main/resources/sql/problem/data-structure/unit03_스택과큐.sql
  • src/main/resources/sql/problem/data-structure/unit04_트리기본.sql
  • src/main/resources/sql/problem/data-structure/unit05_이진트리와이진탐색트리.sql
  • src/main/resources/sql/problem/data-structure/unit06_힙과우선순위큐.sql
  • src/main/resources/sql/problem/data-structure/unit07_트라이.sql
  • src/main/resources/sql/problem/data-structure/unit08_균형이진탐색트리.sql
  • src/main/resources/sql/problem/data-structure/unit09_해시테이블.sql
  • src/main/resources/sql/problem/data-structure/unit10_그래프.sql
  • src/main/resources/sql/problem4.sql
  • src/main/resources/sql/problem5.sql
  • src/main/resources/sql/unit.sql
🔇 Additional comments (19)
src/main/resources/sql/problem/data-structure/unit08_균형이진탐색트리.sql (2)

14-67: Lesson 1 데이터 구조 양호

AVL 트리 기초 문제집의 데이터 구조가 올바르게 구성되어 있습니다:

  • OBJECTIVE 문제마다 4개의 선택지
  • SUBJECTIVE 문제마다 정답 레코드
  • 외래 키 참조 일관성 유지

5-8: unit_id 8 외래 키 관계 확인 완료

lesson 테이블의 unit_id 8 참조가 유효합니다. src/main/resources/sql/unit.sql 파일에 ID가 8인 "균형 이진 탐색 트리" 유닛이 정의되어 있으므로 외래 키 제약 조건을 만족합니다.

src/main/resources/sql/problem/data-structure/unit05_이진트리와이진탐색트리.sql (1)

60-65: 기술적 내용 정확성 확인 완료

이진 트리와 이진 탐색 트리에 대한 기술적 설명이 정확합니다:

  • 포화 이진 트리의 노드 개수 공식 (2^h - 1) 올바름
  • BST의 평균 시간 복잡도 O(log n) 올바름
  • 설명과 예시가 적절함

다만, 앞서 언급한 대로 'o(log n)' 표기를 'O(log n)'으로 통일하는 것을 권장합니다.

Also applies to: 115-119

src/main/resources/sql/problem/data-structure/unit01_배열.sql (1)

1-173: 배열 관련 기술 내용 정확성 양호

배열 자료구조에 대한 설명이 정확하고 포괄적입니다:

  • 논리적/물리적 저장 순서 일치
  • 접근 O(1), 탐색 O(n) 시간 복잡도
  • 삽입/삭제 시 원소 이동 필요성
  • 캐시 지역성의 장점
  • 크기 고정의 단점

내용의 교육적 품질이 우수합니다.

src/main/resources/sql/problem/data-structure/unit07_트라이.sql (1)

13-120: 트라이 자료구조 설명 정확성 확인

트라이(Trie) 자료구조에 대한 기술적 설명이 정확합니다:

  • 접두사 트리(Prefix Tree) 정의
  • 시간 복잡도 O(M) (M = 문자열 길이)
  • 메모리 오버헤드 설명 (포인터 배열)
  • 자동완성 등 실제 활용 사례

내용이 정확하고 이해하기 쉽게 작성되었습니다.

src/main/resources/sql/problem/data-structure/unit09_해시테이블.sql (1)

122-125: 답안 형식의 일관성 확인

개별 체이닝과 선형 탐사의 영문 표기에서 띄어쓰기 패턴이 다릅니다:

  • Line 122: "separate chaining" (띄어쓰기 있음)
  • Line 124: "linear probing" (띄어쓰기 있음)

다른 파일들과 비교하여 이러한 영문 표기가 일관되게 사용되고 있는지 확인이 필요합니다.

src/main/resources/sql/problem/data-structure/unit03_스택과큐.sql (1)

1-179: LGTM - 스택과 큐 문제 데이터

스택과 큐 관련 문제 데이터가 잘 구조화되어 있습니다. 기술적 내용(LIFO/FIFO, O(1) 시간 복잡도, 포인터 관리 등)이 정확하고, 설명이 명확합니다.

src/main/resources/sql/problem/data-structure/unit06_힙과우선순위큐.sql (1)

60-63: 교육 내용 정확성 확인 우수

완전 이진 트리와 힙의 특성에 대한 설명이 기술적으로 정확하고 명확합니다. 특히 배열 인덱스 관계(2i, 2i+1, i/2)에 대한 설명이 잘 되어 있습니다.

src/main/resources/sql/problem/data-structure/unit02_연결리스트.sql (1)

14-157: 연결리스트 교육 내용 우수

연결리스트의 핵심 개념(노드 구조, 포인터, 시간 복잡도, 메모리 배치)에 대한 설명이 정확하고 체계적입니다. 배열과의 비교 설명도 명확합니다.

src/main/resources/sql/problem/data-structure/unit10_그래프.sql (1)

1-185: 그래프 이론 내용 우수

그래프의 기본 개념, 유향/무향 그래프, 가중치 그래프, DAG, DFS/BFS, 인접 리스트/행렬 등 핵심 개념에 대한 설명이 정확하고 포괄적입니다.

src/main/resources/sql/unit.sql (2)

2-8: 챕터 참조 주석이 명확합니다.

챕터 ID와 이름을 매핑한 주석이 추가되어 데이터 구조를 이해하기 쉬워졌습니다. 유지보수성이 향상되었습니다.


77-92: Chapter 5 (운영체제) 데이터 추가가 적절합니다.

새로운 운영체제 챕터의 14개 유닛 데이터가 일관된 구조로 추가되었습니다. chapter_id=5는 chapter.sql에 정의되어 있으며, 유닛 ID 시퀀스(56-69)도 올바르게 연속됩니다. SQL 문법 또한 정확합니다.

src/main/resources/sql/problem/data-structure/unit04_트리기본.sql (7)

14-20: Lesson 1 문제 정의가 적절합니다.

트리 기초 개념을 다루는 6개 문제가 객관식과 주관식으로 균형있게 구성되었습니다. 문제 타입과 내용이 교육적으로 적절합니다.


22-57: 옵션 데이터가 잘 구조화되어 있습니다.

각 객관식 문제에 4개의 선택지와 상세한 설명이 제공되며, is_answer 플래그가 올바르게 설정되었습니다. 설명의 교육적 품질도 우수합니다.


59-63: 주관식 답안 처리가 우수합니다.

다국어 표현과 공백 변형을 고려한 답안 형식(예: "사이클,cycle,순환,순환구조", "n-1,n - 1")은 답안 검증의 유연성을 높입니다.


69-118: Lesson 2 트리 순회 문제가 체계적입니다.

전위, 중위, 후위, 레벨 순회를 다루는 문제들이 명확한 설명과 함께 제공됩니다. 특히 중위 순회(BST 정렬 출력)와 후위 순회(트리 삭제)의 활용 사례가 잘 설명되었습니다.


124-173: Lesson 3 트리 응용 문제가 포괄적입니다.

트리 용어, 속성, 실무 활용(파일 시스템)을 다룹니다. 주관식 답안에 다양한 표기 변형(예: "부모-자식,부모 자식,parent-child,부모자식,parent child")을 포함하여 채점 정확도를 높였습니다.


5-8: 레슨 정의 확인 완료 - 이슈 없음

검증 결과, 세 개의 레슨(ID 10-12)은 기존 데이터와 충돌하지 않으며, unit_id=4는 "트리 기본" 유닛에 올바르게 매핑되어 있습니다. SQL 구문도 정확합니다.


1-173: 파일의 전체 구조가 일관성 있게 정리되었습니다.

레슨-문제-옵션-답안의 데이터 구조가 체계적으로 구성되어 있고, 외래키 관계도 적절히 유지되고 있습니다.

다른 유닛 문제 파일들과 ID 충돌이 없는지 확인이 필요합니다. 해당 PR의 다른 SQL 파일들과 함께 다음 ID 범위의 충돌 여부를 검토하세요:

  • Lesson IDs: 10-12
  • Problem IDs: 55-72
  • Option IDs: 145-192
  • Answer IDs: 19-24

Comment on lines +3 to +8
INSERT INTO chapter (id, title, description)
VALUES (1, '자료구조', '데이터를 효율적으로 저장하고 관리하는 구조'),
(2, '알고리즘', '문제 해결을 위한 체계적인 절차와 기법'),
(3, '네트워크', '컴퓨터 간 통신을 위한 구조와 프로토콜'),
(4, '데이터베이스', '데이터를 체계적으로 저장하고 관리하는 시스템'),
(5, '운영체제', '컴퓨터 하드웨어와 소프트웨어를 관리하는 시스템');
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "*.sql" | head -20

Repository: Team-Gravit/gravit-server

Length of output: 1120


🏁 Script executed:

[ -f "src/main/resources/sql/chapter.sql" ] && echo "File exists" || echo "File not found"

Repository: Team-Gravit/gravit-server

Length of output: 80


🏁 Script executed:

if [ -f "src/main/resources/sql/chapter.sql" ]; then
  echo "=== Content of chapter.sql ==="
  cat -n "src/main/resources/sql/chapter.sql"
fi

Repository: Team-Gravit/gravit-server

Length of output: 462


🏁 Script executed:

ls -la src/main/resources/sql/ 2>/dev/null || echo "Directory not found"

Repository: Team-Gravit/gravit-server

Length of output: 687


🏁 Script executed:

cat -n src/main/resources/db/migration/V1__init_tables.sql

Repository: Team-Gravit/gravit-server

Length of output: 13472


🏁 Script executed:

cat -n src/main/resources/sql/unit.sql

Repository: Team-Gravit/gravit-server

Length of output: 4848


🏁 Script executed:

cat -n src/main/resources/data.sql | head -50

Repository: Team-Gravit/gravit-server

Length of output: 3172


🏁 Script executed:

# Check for any references to chapter.sql in Java code
rg -l "chapter\.sql" src/main/java/ 2>/dev/null || echo "No references found"

Repository: Team-Gravit/gravit-server

Length of output: 88


🏁 Script executed:

# Check for any duplicate key handling in the SQL files
rg -n "INSERT IGNORE|ON DUPLICATE|UPSERT|REPLACE INTO" src/main/resources/sql/ || echo "No duplicate handling found"

Repository: Team-Gravit/gravit-server

Length of output: 96


🏁 Script executed:

# Check Spring Boot configuration files for database initialization
find src/main/resources -type f \( -name "application*.yml" -o -name "application*.yaml" -o -name "application*.properties" \) -exec cat -n {} +

Repository: Team-Gravit/gravit-server

Length of output: 8822


🏁 Script executed:

# Check if there's any Spring configuration or context configuration
rg -n "spring.sql.init|spring.jpa.hibernate|spring.datasource.initialization" src/main/resources/

Repository: Team-Gravit/gravit-server

Length of output: 51


🏁 Script executed:

# Check pom.xml or build.gradle for database initialization settings
cat -n pom.xml 2>/dev/null | head -100

Repository: Team-Gravit/gravit-server

Length of output: 51


🏁 Script executed:

# Look for any V3+ migration files that might clean up or manage duplicates
ls -la src/main/resources/db/migration/

Repository: Team-Gravit/gravit-server

Length of output: 323


🏁 Script executed:

# Check if there's a schema.sql or data.sql in standard Spring Boot location
ls -la src/main/resources/ | grep -E "\.sql$"

Repository: Team-Gravit/gravit-server

Length of output: 126


🏁 Script executed:

# Check for README or documentation about data initialization
find . -maxdepth 2 -type f -name "README*" -o -name "*.md" | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && cat -n {} | head -30'

Repository: Team-Gravit/gravit-server

Length of output: 1701


🏁 Script executed:

# Check if data.sql or sql files are referenced in any SQL migrations
rg -n "data\.sql|chapter\.sql" src/main/resources/db/migration/

Repository: Team-Gravit/gravit-server

Length of output: 51


🏁 Script executed:

# Check V2 migration to understand the schema management strategy
cat -n src/main/resources/db/migration/V2__init_indexes.sql

Repository: Team-Gravit/gravit-server

Length of output: 1017


하드코딩된 ID로 인한 중복 키 충돌 가능성 확인 필요

INSERT 문에서 ID를 명시적으로 지정하고 있어, 스크립트를 여러 번 실행하거나 데이터가 이미 존재할 경우 중복 키 오류가 발생할 수 있습니다. 다음 사항을 확인하세요:

  • 이 스크립트가 초기 데이터 설정용인지, 반복 실행이 가능해야 하는지
  • 다른 SQL 파일들(예: unit.sql)의 ID 범위와 충돌하지 않는지

필요시 다음과 같은 PostgreSQL 문법을 고려하세요:

  • ON CONFLICT (id) DO NOTHING - 충돌 시 무시
  • ON CONFLICT (id) DO UPDATE SET ... - 충돌 시 기존 데이터 업데이트
  • 트랜잭션 래핑으로 일관성 보장
🤖 Prompt for AI Agents
In @src/main/resources/sql/chapter.sql around lines 3 - 8, The INSERT into
chapter currently hardcodes ids which can cause primary key conflicts when
re-running the script; modify the INSERT into chapter to either omit the id
column so the DB assigns it (use DEFAULT/serial), or keep explicit ids but add
PostgreSQL conflict handling such as appending an ON CONFLICT (id) DO NOTHING or
ON CONFLICT (id) DO UPDATE SET ... clause to the INSERT, and consider wrapping
the operation in a transaction to ensure consistency; locate the INSERT
statement that targets the chapter table to apply the chosen change.

Comment on lines +17 to +19
(93, 16, '제시된 내용과 관련하여 옳은 것은?', '힙은 여러 종류가 있으며 각각 다른 특징을 가진다.', 'OBJECTIVE'),
(94, 16, '제시된 내용과 관련하여 옳은 것은?', '힙은 여러 종류가 있으며 각각 다른 특징을 가진다.', 'OBJECTIVE'),
(95, 16, '빈칸에 들어갈 알맞은 말을 작성하시오', '힙에서 최대값 또는 최소값에 접근하는 시간 복잡도는 ___이다.', 'SUBJECTIVE'),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

중복 문제 발견

Problem ID 93 (Line 17)과 Problem ID 94 (Line 18)의 instruction과 content가 완전히 동일합니다:

  • 둘 다: '제시된 내용과 관련하여 옳은 것은?', '힙은 여러 종류가 있으며 각각 다른 특징을 가진다.'

Line 17-18의 두 문제가 서로 다른 option set(최대 힙과 최소 힙)을 다루고 있지만, 문제 자체의 텍스트가 동일하면 학습자 입장에서 혼란스러울 수 있습니다.

💡 제안하는 수정
        (93, 16, '제시된 내용과 관련하여 옳은 것은?', '힙은 여러 종류가 있으며 각각 다른 특징을 가진다.', 'OBJECTIVE'),
-       (94, 16, '제시된 내용과 관련하여 옳은 것은?', '힙은 여러 종류가 있으며 각각 다른 특징을 가진다.', 'OBJECTIVE'),
+       (94, 16, '제시된 내용과 관련하여 옳은 것은?', '최소 힙은 특정한 규칙을 따르는 힙의 한 종류이다.', 'OBJECTIVE'),
🤖 Prompt for AI Agents
In @src/main/resources/sql/problem/data-structure/unit06_힙과우선순위큐.sql around
lines 17 - 19, Two consecutive problem rows with IDs 93 and 94 have identical
instruction and content text causing duplication; update one row (Problem ID 94)
so its instruction/content clearly targets the alternative option set (e.g.,
reference "최대 힙과 최소 힙 중 어느 것이 옳은가?" or explicitly mention "최소 힙에 대한 설명으로 옳은
것은?") to differentiate it from Problem ID 93 which covers the other heap type;
ensure the tuple for Problem ID 94 reflects the corrected prompt and any
adjusted choice wording so each problem uniquely corresponds to its intended
option set.

'이는 이진 탐색 트리의 동작 방식이다. 해시테이블은 해시 함수로 위치를 직접 계산한다.', false),
(404, 151, '트리 구조로 데이터를 탐색한다',
'해시테이블은 배열 기반이며 해시 함수로 인덱스를 계산한다. 트리 구조를 사용하지 않는다.', false),

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

오타 수정 필요: "crsize" → "크기"

Line 149의 설명에 오타가 있습니다. "crsize 제한이 없다"는 "크기 제한이 없다"가 되어야 합니다.

🔧 제안하는 수정
-       (134, 51, 'crsize 제한이 없다',
+       (134, 51, '크기 제한이 없다',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(134, 51, '크기 제한이 없다',
🤖 Prompt for AI Agents
In @src/main/resources/sql/problem/data-structure/unit09_해시테이블.sql at line 149,
There's a typo in the comment text on line 149 where "crsize 제한이 없다" should read
"크기 제한이 없다"; update the description to replace the incorrect token "crsize" with
the correct Korean word "크기" (look for the exact phrase "crsize 제한이 없다" in the
SQL file and change it to "크기 제한이 없다") so the explanation reads correctly.

true);

INSERT INTO answer (id, problem_id, content, explanation)
VALUES (51, 152, 'O(n),선형시간,선형 시간,linear time,',
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Answer content에서 trailing comma 제거

Line 181의 answer content 끝에 불필요한 쉼표가 있습니다: 'O(n),선형시간,선형 시간,linear time,'

🔧 제안하는 수정
-VALUES (51, 152, 'O(n),선형시간,선형 시간,linear time,',
+VALUES (51, 152, 'O(n),선형시간,선형 시간,linear time',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
VALUES (51, 152, 'O(n),선형시간,선형 시간,linear time,',
VALUES (51, 152, 'O(n),선형시간,선형 시간,linear time',
🤖 Prompt for AI Agents
In @src/main/resources/sql/problem/data-structure/unit09_해시테이블.sql at line 181,
Remove the trailing comma inside the SQL VALUES string literal 'O(n),선형시간,선형
시간,linear time,' so the answer content ends with 'linear time' (i.e., update the
VALUES tuple entry to remove the final comma from that quoted string).

Comment on lines +64 to +65
VALUES (53, 158, '정점,vertex,노드,node,vertices,node',
'그래프는 여러 개의 정점(Vertex)과 이들을 잇는 간선(Edge)으로 이루어진 자료구조이다. 정점은 노드(Node)라고도 불리며, 간선은 정점들 사이의 연결 관계를 나타낸다.'),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

답안에서 중복 제거

Line 64의 answer content에 "node"가 두 번 포함되어 있습니다: '정점,vertex,노드,node,vertices,node'

🔧 제안하는 수정
-VALUES (53, 158, '정점,vertex,노드,node,vertices,node',
+VALUES (53, 158, '정점,vertex,노드,node,vertices',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
VALUES (53, 158, '정점,vertex,노드,node,vertices,node',
'그래프는 여러 개의 정점(Vertex)과 이들을 잇는 간선(Edge)으로 이루어진 자료구조이다. 정점은 노드(Node)라고도 불리며, 간선은 정점들 사이의 연결 관계를 나타낸다.'),
VALUES (53, 158, '정점,vertex,노드,node,vertices',
'그래프는 여러 개의 정점(Vertex)과 이들을 잇는 간선(Edge)으로 이루어진 자료구조이다. 정점은 노드(Node)라고도 불리며, 간선은 정점들 사이의 연결 관계를 나타낸다.'),
🤖 Prompt for AI Agents
In @src/main/resources/sql/problem/data-structure/unit10_그래프.sql around lines 64
- 65, The VALUES tuple for id 53 contains a duplicated token "node" in the
answer string ('정점,vertex,노드,node,vertices,node'); update that tuple (the
VALUES(...) entry with leading 53) to remove the duplicate so the token list
becomes unique (e.g., '정점,vertex,노드,node,vertices') and preserve the same
comma-separated formatting and surrounding quotes.

Comment on lines +182 to +183
VALUES (57, 170, 'o(v+e),o(v + e)',
'인접 리스트의 공간 복잡도는 O(V+E)이다. V는 정점의 개수, E는 간선의 개수이다. 정점을 저장하는 배열과 간선을 저장하는 리스트를 합한 공간이 필요하다.'),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the specific file and lines mentioned
echo "=== Checking the specific file at lines 180-185 ==="
sed -n '180,185p' src/main/resources/sql/problem/data-structure/unit10_그래프.sql

echo -e "\n=== Searching for Big-O notation patterns in all SQL files ==="
rg -n "[oO]\([^)]*\)" src/main/resources/sql/problem/ | head -50

Repository: Team-Gravit/gravit-server

Length of output: 7400


Big-O 표기법 대소문자 일관성 통일 필요

Line 182의 'o(v+e),o(v + e)'를 포함하여 여러 파일에서 Big-O 표기법이 불일치하게 표기되어 있습니다. 표준 Big-O 표기법은 대문자 O를 사용합니다. 다음 파일들에서 소문자 o가 사용되고 있으므로 O로 통일해야 합니다:

  • unit10_그래프.sql line 182: 'o(v+e),o(v + e)'
  • unit07_트라이.sql line 61, 117: 'o(m),선형 시간,...'
  • unit08_균형이진탐색트리.sql line 66: 'o(log n),로그 시간,...'

프로젝트 전체의 모든 문제 파일에서 답변 옵션(content 필드)의 Big-O 표기를 대문자로 통일하세요.

🤖 Prompt for AI Agents
In @src/main/resources/sql/problem/data-structure/unit10_그래프.sql around lines
182 - 183, Normalize Big-O notation by replacing lowercase 'o' with uppercase
'O' in the SQL content fields: for example change 'o(v+e),o(v + e)' in
unit10_그래프.sql (the VALUES tuple containing that string) to 'O(v+e),O(v + e)';
similarly update 'o(m)' entries in unit07_트라이.sql (lines containing 'o(m),선형
시간,...') to 'O(m)' and 'o(log n)' in unit08_균형이진탐색트리.sql to 'O(log n)'; scan
other problem files for any content fields using lowercase 'o(' and replace with
'O(' to ensure project-wide consistency.

@sukangpunch sukangpunch merged commit 8d80368 into dev Jan 9, 2026
3 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.

refactor: 문제 데이터(데이터베이스, 운영체제) 통합 및 관리 구조 변경

2 participants