Skip to content

Conversation

@zinnnn37
Copy link
Contributor

@zinnnn37 zinnnn37 commented Sep 9, 2025

🧷 문제 링크

수열과 쿼리 16

🧭 풀이 시간

60분

👀 체감 난이도

✏️ 문제 설명

  1. 배열의 값을 바꿀 수 있어야 함
  2. 주어진 부분 배열에서 값이 가장 작은 값의 인덱스를 구해야함

🔍 풀이 방법

세그트리로 풀었는데 인덱스를 구해야해서 Node 클래스로 트리 구성했습니다.
update할 때 일반적인 세그트리처럼 부분 배열의 값을 바로 업데이트 하는 게 아니라
start == end일 때(리프노드일 때) 업데이트 해주는 것이 필수입니다.

⏳ 회고

인덱스를 구해야해서 까다로웠음

@ShinHeeEul ShinHeeEul merged commit 8209168 into main Sep 9, 2025
1 check passed
@zinnnn37 zinnnn37 added the success 👍 해설을 보지 않고 풀었을 때 label Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants