Skip to content

[gcount85] WEEK 06 Solutions#2513

Open
gcount85 wants to merge 4 commits intoDaleStudy:mainfrom
gcount85:main
Open

[gcount85] WEEK 06 Solutions#2513
gcount85 wants to merge 4 commits intoDaleStudy:mainfrom
gcount85:main

Conversation

@gcount85
Copy link
Copy Markdown
Contributor

@gcount85 gcount85 commented Apr 7, 2026

답안 제출 문제

작성자 체크 리스트

  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

검토자 체크 리스트

Important

본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!

  • 바로 이전에 올라온 PR에 본인을 코드 리뷰어로 추가해주세요.
  • 본인이 검토해야하는 PR의 답안 코드에 피드백을 주세요.
  • 토요일 전까지 PR을 병합할 수 있도록 승인해주세요.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🏷️ 알고리즘 패턴 분석

  • 패턴: Two Pointers
  • 설명: 이 코드는 양 끝에서 시작하여 포인터를 이동시키며 최대 용량을 찾는 방식으로, 투포인터 패턴을 사용합니다. 효율적인 탐색을 위해 양쪽 포인터를 조절하는 전략이 핵심입니다.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🏷️ 알고리즘 패턴 분석

  • 패턴: Dynamic Programming
  • 설명: 이 코드는 LIS 문제 해결을 위해 DP 배열을 사용하며, 이전 값들을 참고하여 최장 증가 부분수열을 찾는 방식입니다.

@github-actions github-actions bot added the py label Apr 7, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🏷️ 알고리즘 패턴 분석

  • 패턴: Two Pointers
  • 설명: 이 코드는 행과 열의 경계값을 조절하며 순차적으로 탐색하는 방식으로, 양 끝을 가리키는 포인터를 이동시키는 두 포인터 패턴에 속합니다.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🏷️ 알고리즘 패턴 분석

  • 패턴: Stack / Monotonic Stack
  • 설명: 이 코드는 괄호의 유효성을 검사하기 위해 스택을 이용하여 짝을 맞추는 방식으로 동작합니다. 스택을 활용한 괄호 매칭 문제는 대표적인 스택 패턴입니다.

@dalestudy
Copy link
Copy Markdown
Contributor

dalestudy bot commented Apr 7, 2026

📊 gcount85 님의 학습 현황

이번 주 제출 문제

문제 난이도 유형 분석
container-with-most-water Medium ✅ 의도한 유형
longest-increasing-subsequence Medium ⚠️ 유형 불일치
spiral-matrix Medium ✅ 의도한 유형
valid-parentheses Easy ✅ 의도한 유형

누적 학습 요약

  • 풀이한 문제: 24 / 75개
  • 이번 주 유형 일치율: 75% (4문제 중 3문제 일치)

문제 풀이 현황

카테고리 진행도 완료
Bucket Sort ■■■■■■■ 1 / 1 (Medium 1)
Counting ■■■■■■■ 1 / 1 (Medium 1)
Memoization ■■■■■■■ 2 / 2 (Easy 1, Medium 1)
Quickselect ■■■■■■■ 1 / 1 (Medium 1)
Backtracking ■■■■■□□ 2 / 3 (Medium 2)
Divide and Conquer ■■■■□□□ 3 / 6 (Medium 2, Easy 1)
Hash Table ■■■■□□□ 8 / 16 (Easy 3, Medium 5)
Prefix Sum ■■■■□□□ 1 / 2 (Medium 1)
Trie ■■■■□□□ 2 / 4 (Medium 2)
Sorting ■■■□□□□ 5 / 11 (Medium 3, Easy 2)
Array ■■■□□□□ 15 / 36 (Medium 12, Easy 3)
Dynamic Programming ■■■□□□□ 7 / 18 (Easy 2, Medium 5)
String ■■■□□□□ 7 / 19 (Medium 5, Easy 2)
Binary Search Tree ■■□□□□□ 1 / 3 (Medium 1)
Recursion ■■□□□□□ 1 / 3 (Easy 1)
Binary Search ■■□□□□□ 1 / 4 (Medium 1)
Heap (Priority Queue) ■■□□□□□ 1 / 4 (Medium 1)
Union-Find ■■□□□□□ 1 / 4 (Medium 1)
Bit Manipulation ■□□□□□□ 1 / 5 (Easy 1)
Design ■□□□□□□ 1 / 5 (Medium 1)
Math ■□□□□□□ 1 / 5 (Easy 1)
Two Pointers ■□□□□□□ 2 / 10 (Medium 1, Easy 1)
Binary Tree ■□□□□□□ 2 / 11 (Easy 1, Medium 1)
Tree ■□□□□□□ 2 / 11 (Easy 1, Medium 1)
Depth-First Search ■□□□□□□ 3 / 18 (Easy 1, Medium 2)
Linked List ■□□□□□□ 1 / 6 (Easy 1)
Breadth-First Search ■□□□□□□ 2 / 13 (Medium 1, Easy 1)
Matrix ■□□□□□□ 1 / 7 (Medium 1)
Combinatorics □□□□□□□ 0 / 1 ← 아직 시작 안 함
Data Stream □□□□□□□ 0 / 1 ← 아직 시작 안 함
Graph Theory □□□□□□□ 0 / 5 ← 아직 시작 안 함
Greedy □□□□□□□ 0 / 4 ← 아직 시작 안 함
Hash Function □□□□□□□ 0 / 1 ← 아직 시작 안 함
Merge Sort □□□□□□□ 0 / 1 ← 아직 시작 안 함
Simulation □□□□□□□ 0 / 1 ← 아직 시작 안 함
Sliding Window □□□□□□□ 0 / 3 ← 아직 시작 안 함
Stack □□□□□□□ 0 / 2 ← 아직 시작 안 함
String Matching □□□□□□□ 0 / 1 ← 아직 시작 안 함
Topological Sort □□□□□□□ 0 / 2 ← 아직 시작 안 함

🤖 이 댓글은 GitHub App을 통해 자동으로 작성되었습니다.

Copy link
Copy Markdown
Member

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

각 풀이마다 접근 방법과 복잡도를 문서화해주신 점이 좋습니다. 사소한 피드백 두 가지만 남깁니다.

"""
# Approach
투포인터로 양 끝에서 물의 양을 계산해나갑니다.
더 낮은 height인 쪽의 포인터를 줄여나가는데, 높이가 같은 경우에는 양쪽 모두 포인터를 움직입니다.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

설명이 구현과 다른 것 같네요?

Suggested change
낮은 height인 쪽의 포인터를 줄여나가는데, 높이가 같은 경우에는 양쪽 모두 포인터를 움직입니다.
낮은 height인 쪽의 포인터를 줄여나가는데, 높이가 같은 경우에는 왼쪽 포인터만 움직입니다.

Comment on lines +23 to +25
if not stack:
return True
return False
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

요렇게 짜시면 좀 더 Pythonic한 코드가 되지 않을까 생각해보았습니다. 별로 중요하지 않은 코멘트입니다.

Suggested change
if not stack:
return True
return False
return not stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Solving

Development

Successfully merging this pull request may close these issues.

2 participants