Skip to content

[정민서-12주차 알고리즘 스터디] #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 50 commits into
base: minseojeong/week12
Choose a base branch
from

Conversation

minseojeong1012
Copy link
Contributor

@minseojeong1012 minseojeong1012 commented Apr 13, 2025

🚀 싸피 15반 알고리즘 스터디 12주차 [정민서]

📌 문제 풀이 개요

  • 이번 PR에서는 다음 5문제의 풀이를 포함합니다.
  • 각 문제에 대한 풀이 과정과 접근 방식을 설명합니다.

✅ 문제 해결 여부

  • 문제 1 : 동전1
  • 문제 2 : 파도반 수열
  • 문제 3 : 아기 상어
  • 문제 4 : 아기 상어2
  • 문제 5 : 서강 그라운드

💡 풀이 방법

문제 1: 동전1

문제 난이도
골드 4

문제 유형
DP

접근 방식 및 풀이

N가지의 종류의 동전으로 K 원을 만들어야 하기에 DP를 사용했습니다
동전을 하나씩 고려하며, DP 테이블을 갱신하였고, 1차원 배열을 활용하였습니다

        // 동전을 하나씩 추가하면서 경우의 수를 계산
        for (int i = 0; i < n; i++) {
            for (int j = coins[i]; j <= k; j++) {
                dp[j] += dp[j - coins[i]];
            }
        }

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.

1 participant