본문 바로가기

Java/Java 알고리즘 모음

[Java 알고리즘] 9. DP 모음

반응형

 

 

 

https://cote.inflearn.com/contest/10/problem/10-01

 

OnlineJudge

 

cote.inflearn.com

https://and-some.tistory.com/641

 

[Ch.10 - DP] 01. 계단오르기

1. 계단오르기 설명 철수는 계단을 오를 때 한 번에 한 계단 또는 두 계단씩 올라간다. 만약 총 4계단을 오른다면 그 방법의 수는 1+1+1+1, 1+1+2, 1+2+1, 2+1+1, 2+2 로 5가지이다. 그렇다면 총 N계단일 때

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/10-02

 

OnlineJudge

 

cote.inflearn.com

https://and-some.tistory.com/642

 

[Ch.10 - DP] 02. 돌다리 건너기

1. 계단오르기 설명 철수는 계단을 오를 때 한 번에 한 계단 또는 두 계단씩 올라간다. 만약 총 4계단을 오른다면 그 방법의 수는 1+1+1+1, 1+1+2, 1+2+1, 2+1+1, 2+2 로 5가지이다. 그렇다면 총 N계단일 때

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/10-03

 

OnlineJudge

 

cote.inflearn.com

https://and-some.tistory.com/643

 

[Ch.10 - DP] 03. 최대 부분 증가수열 [+LIS]

3. 최대 부분 증가수열 설명 N개의 자연수로 이루어진 수열이 주어졌을 때, 그 중에서 가장 길게 증가하는(작은 수에서 큰 수로) 원소들의 집합을 찾는 프로그램을 작성하라. 예를 들어, 원소가 2,

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/10-04

 

OnlineJudge

 

cote.inflearn.com

https://and-some.tistory.com/660

 

[Ch.10 - DP] 04. 가장 높은 탑 쌓기[+LIS]

4. 가장 높은 탑 쌓기 설명 밑면이 정사각형인 직육면체 벽돌들을 사용하여 탑을 쌓고자 한다. 탑은 벽돌을 한 개씩 아래에서 위로 쌓으면서 만들어 간다. 아래의 조건을 만족하면서 가장 높은

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/10-05

 

OnlineJudge

 

cote.inflearn.com

https://and-some.tistory.com/662

 

[Ch.10 - DP] 05. 동전교환 [+냅색 알고리즘]

5. 동전교환(냅색 알고리즘) 냅색 알고리즘 : 담을 수 있는 무게가 정해진 백팩에 가장 비싼 금액의 물건으로 채우는 알고리즘 설명 다음과 같이 여러 단위의 동전들이 주어져 있을때 거스름돈을

and-some.tistory.com

 

https://cote.inflearn.com/contest/10/problem/10-06

 

OnlineJudge

 

cote.inflearn.com

https://and-some.tistory.com/663

 

[Ch.10 - DP] 06. 최대점수 구하기 [+냅색 알고리즘]

6. 최대점수 구하기(냅색 알고리즘) 설명 이번 정보올림피아드대회에서 좋은 성적을 내기 위하여 현수는 선생님이 주신 N개의 문제를 풀려고 합니다. 각 문제는 그것을 풀었을 때 얻는 점수와 푸

and-some.tistory.com


https://leetcode.com/problems/unique-paths/

 

Unique Paths - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/916

 

[LeetCode- Ch8. 동적계획법] 1. 유일한 경로

https://leetcode.com/problems/unique-paths/ Unique Paths - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 조건 (0,0)부터 (n,m)

and-some.tistory.com

 

https://leetcode.com/problems/climbing-stairs/

 

Climbing Stairs - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/917

 

[LeetCode- Ch8. 동적계획법] 2. 계단 오르기 #

https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1칸이나 2칸씩 오를

and-some.tistory.com

 

 

https://leetcode.com/problems/coin-change/submissions/

 

Coin Change - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/918

 

[LeetCode- Ch8. 동적계획법] 3. 동전 교환 #

https://leetcode.com/problems/coin-change/submissions/ Coin Change - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 참고자료 - 냅색

and-some.tistory.com

 

 

https://leetcode.com/problems/longest-increasing-subsequence/

 

Longest Increasing Subsequence - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/919

 

[LeetCode- Ch8. 동적계획법] 4. 가장 긴 증가하는 서브시퀀스

https://leetcode.com/problems/longest-increasing-subsequence/ Longest Increasing Subsequence - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.c

and-some.tistory.com

 


https://leetcode.com/problems/word-break/

 

Word Break - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/928

 

[LeetCode- Part. 1] 5. 단어 나누기 #

https://leetcode.com/problems/word-break/ Word Break - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문자 s와 문자열 리스트 wordD

and-some.tistory.com

 

 

https://leetcode.com/problems/concatenated-words/submissions/

 

Concatenated Words - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/934

 

[LeetCode- Part. 2] 3. 두 단어 이상 연결된 단어 #

https://leetcode.com/problems/concatenated-words/submissions/ Concatenated Words - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 참고

and-some.tistory.com

 


2차원 DP

https://leetcode.com/problems/longest-palindromic-substring/submissions/

 

Longest Palindromic Substring - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/935

 

[LeetCode- Part. 2] 4. 가장 긴 회문 부분 문자열 (+ 2차원 DP) #

https://leetcode.com/problems/longest-palindromic-substring/submissions/ Longest Palindromic Substring - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

and-some.tistory.com

 

 

https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule/

 

Minimum Difficulty of a Job Schedule - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/950

 

[LeetCode- Part. 4] 3. 작업 일정의 최소 난이도 # (+ 2차원 DP)

https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule/ Minimum Difficulty of a Job Schedule - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview

and-some.tistory.com

 

 

https://leetcode.com/problems/maximal-square/

 

Maximal Square - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/951

 

[LeetCode- Part. 4] 4. 최대 정사각형 # (+ 2차원 DP)

https://leetcode.com/problems/maximal-square/ Maximal Square - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 규칙을 찾아서 DP 배열

and-some.tistory.com

 

 

https://and-some.tistory.com/944

 

5. 퍼즐게임 (+ 2차원 DP)

// 퍼즐게임 // 2장의 카드가 남을 때 까지 반복해서 뽑는다 -> (뽑은 카드)*(뽑은 왼쪽 카드)*(뽑은 오른쪽 카드) 결과를 더한다. // 나열된 카드 중에서 맨 왼쪽 카드와 맨 오른쪽 카드는 뽑아서는

and-some.tistory.com

 

반응형