Skip to content

yarncha/algorithm-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

yamcha's

μ•Œκ³ λ¦¬μ¦˜ 풀이 μ €μž₯μ†Œ

μ•Œκ³ λ¦¬μ¦˜ 문제λ₯Ό ν’€κ³  풀이λ₯Ό μ˜¬λ¦¬λŠ” repository μž…λ‹ˆλ‹€.

C++ Visual Studio

Index

Icons

✨ = 슀슀둜 잘 ν’€μ—ˆλ‹€κ³  생각
πŸ€” = μ–΄λ €μ› μŒ
✏ = 주석 꼼꼼히 μž‘μ„±ν•¨ (μ°Έκ³ ν•˜κΈ° μ’‹λ‹€)
πŸ‘€ = 닡지 μ°Έκ³ 

Baekjoon

solved.ac tier

No. Name Group Memo Solution
1000 A+B πŸ“œ
1001 A-B πŸ“œ
1008 A/B μ†Œμˆ˜μ  μ•„λž˜ 숫자 κ³ μ • πŸ“œ
1107 리λͺ¨μ»¨ 브루트포슀 λ²”μœ„ 쀄이렀고 λ…Έλ ₯함. μ˜ˆμ™Έκ°€ λ„ˆλ¬΄ λ§Žμ•„μ„œ νž˜λ“€μ—ˆμŒ πŸ“œ
1149 RGB거리✨ DP πŸ“œ
1158 μš”μ„Έν‘ΈμŠ€ 문제 Queue πŸ“œ
1167 트리의 지름 DFS 1967번과 λΉ„μŠ·ν•œ 문제, DFS 탐색을 2번 μ΄μš©ν•˜μ—¬ ν’€μŒ πŸ“œ
1212 8μ§„μˆ˜ 2μ§„μˆ˜ πŸ“œ
1248 맞좰봐 πŸ“œ
1260 DFS와 BFS BFS, DFS πŸ“œ
1261 μ•Œκ³ μŠ€νŒŸ BFS πŸ“œ
1309 λ™λ¬Όμ›βœ¨ DP πŸ“œ
1373 2μ§„μˆ˜ 8μ§„μˆ˜ πŸ“œ
1406 에디터 Stack πŸ“œ
1463 1둜 λ§Œλ“€κΈ° DP πŸ“œTop-down방식, πŸ“œBottom-up 방식
1476 λ‚ μ§œ 계산 πŸ“œ
1676 νŒ©ν† λ¦¬μ–Ό 0의 개수✨ νŒ©ν† λ¦¬μ–Όμ—μ„œμ˜ 0의 개수 κ΅¬ν•˜κΈ°, 5의 개수둜 세어보면 됨 πŸ“œ
1697 μˆ¨λ°”κΌ­μ§ˆ BFS πŸ“œ
1699 제곱수의 ν•© DP πŸ“œ
1707 이뢄 κ·Έλž˜ν”„ BFS 슀슀둜 νžˆλ“ μΌ€μ΄μŠ€λ„ 잘 생각해보고 꼼꼼히 μ½”λ“œλ₯Ό μž‘μ„±ν•΄μ„œ λ†“μΉ˜λŠ” μΌ€μ΄μŠ€λŠ” μ—†μ—ˆλŠ”λ° λ§ˆμ§€λ§‰μ— 좜λ ₯ν•˜λŠ” λΆ€λΆ„μ—μ„œ "\n" μ•ˆν•΄μ€˜μ„œ μ—¬λŸ¬ 번 ν‹€λ Έλ˜.. μ§„μ§œ λ„ˆλ¬΄ μ•„μ‰¬μš΄ 문제... πŸ“œ
1748 수 이어 μ“°κΈ° 1 브루트포슀 πŸ“œ
1759 μ•”ν˜Έ λ§Œλ“€κΈ° πŸ“œ
1788 ν”Όλ³΄λ‚˜μΉ˜ 수의 ν™•μž₯ DP πŸ“œ
1874 μŠ€νƒ μˆ˜μ—΄ Stack πŸ“œ
1912 연속합 DP πŸ“œ
1918 ν›„μœ„ ν‘œκΈ°μ‹ μ°¨λŸ‰κΈ°μ§€ μ•Œκ³ λ¦¬μ¦˜(μ€‘μœ„ ν‘œκΈ°λ²•μ„ ν›„μœ„ ν‘œκΈ°λ²•μœΌλ‘œ λ³€ν™˜) πŸ“œ
1929 μ†Œμˆ˜ κ΅¬ν•˜κΈ° λ²”μœ„ λ‚΄μ˜ λͺ¨λ“  μ†Œμˆ˜ κ΅¬ν•˜κΈ°, μ—λΌν† μŠ€ν…Œλ„€μŠ€μ˜ 체 πŸ“œ
1932 μ •μˆ˜ μ‚Όκ°ν˜•βœ¨ DP πŸ“œ
1934 μ΅œμ†Œκ³΅λ°°μˆ˜ gcd πŸ“œ
1935 ν›„μœ„ ν‘œκΈ°μ‹2 πŸ“œ
1967 트리의 지름 1167번과 λΉ„μŠ·ν•œ 문제, ν¬μŠ€νŠΈμ˜€λ”λ₯Ό μ΄μš©ν•˜μ—¬ ν’€μ—ˆμŒ πŸ“œ
1978 μ†Œμˆ˜ μ°ΎκΈ° μ–΄λ–€ μˆ˜κ°€ μ†Œμˆ˜μΈμ§€ νŒλ‹¨ πŸ“œ
1991 트리 순회 트리 πŸ“œ
2004 μ‘°ν•© 0의 개수✨ μ‘°ν•©μ—μ„œ 0의 개수 κ΅¬ν•˜κΈ°, νŒ©ν† λ¦¬μ–Όκ³Ό λΉ„μŠ·, μ΄λ²ˆμ—” 5와 2 같이 μ„ΈκΈ° πŸ“œ
2089 -2μ§„μˆ˜ μ§„μˆ˜ λ³€ν™˜ (μˆ˜ν•™) πŸ“œ
2133 타일 μ±„μš°κΈ° DP πŸ“œ
2146 닀리 λ§Œλ“€κΈ°βœ¨ BFS πŸ“œ
2156 포도주 μ‹œμ‹ DP πŸ“œ
2178 미둜 탐색 BFS πŸ“œ
2193 이친수 DP πŸ“œ
2225 ν•©λΆ„ν•΄ DP πŸ“œ
2250 트리의 높이와 λ„ˆλΉ„βœ¨ 트리, Queueμ΄μš©ν•œ BFS νƒμƒ‰μœΌλ‘œ μ΅œλŒ€ λ„ˆλΉ„ νƒμƒ‰ν•΄μ€Œ, 50번째 μ€„μ—μ„œ λ³€μˆ˜λ₯Ό 잘λͺ» μ¨μ„œ μ—¬λŸ¬ 번 ν‹€λ¦° μ•„μ‰¬μš΄ λ¬Έμ œγ… γ…  πŸ“œ
2309 일곱 λ‚œμŸμ΄ πŸ“œ
2468 μ•ˆμ „ μ˜μ—­ BFS πŸ“œ
2529 λΆ€λ“±ν˜Έ πŸ“œ
2557 Hello World πŸ“œ
2558 A+B - 2 πŸ“œ
2579 계단 였λ₯΄κΈ° DP πŸ“œ
2606 λ°”μ΄λŸ¬μŠ€ BFS πŸ“œ
2609 μ΅œλŒ€κ³΅μ•½μˆ˜μ™€ μ΅œμ†Œκ³΅λ°°μˆ˜ gcd, lcm πŸ“œ
2644 μ΄Œμˆ˜κ³„μ‚° BFS πŸ“œ
2667 λ‹¨μ§€λ²ˆν˜ΈλΆ™μ΄κΈ° BFS πŸ“œ
2743 단어 길이 재기 πŸ“œ
2745 진법 λ³€ν™˜ πŸ“œ
3085 사탕 κ²Œμž„ πŸ“œ
4963 μ„¬μ˜ 개수 BFS πŸ“œ
5014 μŠ€νƒ€νŠΈλ§ν¬ BFS πŸ“œ
6064 μΉ΄μž‰ 달λ ₯ 브루트포슀 πŸ“œ
6588 κ³¨λ“œλ°”νμ˜ μΆ”μΈ‘ λ²”μœ„ λ‚΄μ˜ λͺ¨λ“  μ†Œμˆ˜ κ΅¬ν•˜κΈ°, μ—λΌν† μŠ€ν…Œλ„€μŠ€μ˜ 체 πŸ“œ
6603 둜또 πŸ“œ
7287 등둝 πŸ“œ
7562 λ‚˜μ΄νŠΈμ˜ 이동 BFS πŸ“œ
7569 ν† λ§ˆν†  BFS μ‹œκ°„ μ’€ 였래 걸렸음 πŸ“œ, πŸ“œμ’€ 더 λΉ λ₯Έ 방법
7576 ν† λ§ˆν†  BFS πŸ“œ
9012 κ΄„ν˜Έ Stack πŸ“œ, πŸ“œμŠ€νƒ 이용 풀이
9093 단어 뒀집기 Stack πŸ“œ
9095 1, 2, 3 λ”ν•˜κΈ° DP πŸ“œ, πŸ“œμž¬κ·€ν•¨μˆ˜λ₯Ό μ΄μš©ν•œ 브루트포슀 풀이
9205 λ§₯μ£Ό λ§ˆμ‹œλ©΄μ„œ κ±Έμ–΄κ°€κΈ° ν”Œλ‘œμ΄λ“œ μ›Œμƒ¬ πŸ“œ
9465 μŠ€ν‹°μ»€ DP πŸ“œ
9613 GCD ν•© gcd πŸ“œ
10430 λ‚˜λ¨Έμ§€ πŸ“œ
10718 We love kriii πŸ“œ
10799 μ‡ λ§‰λŒ€κΈ° Stack πŸ“œ
10808 μ•ŒνŒŒλ²³ 개수 μ•„μŠ€ν‚€μ½”λ“œ, string πŸ“œ
10809 μ•ŒνŒŒλ²³ μ°ΎκΈ° μ•„μŠ€ν‚€μ½”λ“œ, string πŸ“œ
10819 차이λ₯Ό μ΅œλŒ€λ‘œ πŸ“œ
10820 λ¬Έμžμ—΄ 뢄석 πŸ“œ
10824 λ„€ 수 πŸ“œμžλ¦¬μˆ˜ 이용 풀이, πŸ“œλ¬Έμžμ—΄ κ΄€λ ¨ ν•¨μˆ˜ μ‚¬μš©
10828 μŠ€νƒ(κ΅¬ν˜„) Stack πŸ“œ, πŸ“œλΌμ΄λΈŒλŸ¬λ¦¬ μ‚¬μš©
10844 μ‰¬μš΄ 계단 수 DP πŸ“œ
10845 큐(κ΅¬ν˜„) Queue πŸ“œ, πŸ“œλΌμ΄λΈŒλŸ¬λ¦¬ μ‚¬μš©
10866 덱 Stack, Queue πŸ“œ
10869 사칙연산 πŸ“œ
10872 νŒ©ν† λ¦¬μ–Ό πŸ“œ
10950 A+B - 3 πŸ“œ
10951 A+B - 4 πŸ“œ
10952 A+B - 5 πŸ“œ
10971 μ™ΈνŒμ› 순회 2 πŸ“œ
10972 λ‹€μŒ μˆœμ—΄ πŸ“œβœ, πŸ“œβœnext_permutation 직접 κ΅¬ν˜„ν•΄λ³Έ μ½”λ“œ
10973 이전 μˆœμ—΄ πŸ“œβœ, πŸ“œβœprev_permutation 직접 κ΅¬ν˜„ν•΄λ³Έ μ½”λ“œ
10974 λͺ¨λ“  μˆœμ—΄ πŸ“œ
10998 AxB πŸ“œ
11005 진법 λ³€ν™˜ 2 πŸ“œ
11021 A+B - 7 πŸ“œ
11022 A+B - 8 πŸ“œ
11052 μΉ΄λ“œ κ΅¬λ§€ν•˜κΈ° DP πŸ“œ
11053 κ°€μž₯ κΈ΄ μ¦κ°€ν•˜λŠ” λΆ€λΆ„ μˆ˜μ—΄βœ¨ DP πŸ“œ
11054 κ°€μž₯ κΈ΄ 바이토닉 λΆ€λΆ„ μˆ˜μ—΄ DP πŸ“œ
11055 κ°€μž₯ 큰 증가 λΆ€λΆ„ μˆ˜μ—΄ DP πŸ“œ
11057 였λ₯΄λ§‰ 수 DP πŸ“œ
11576 Base Conversion πŸ“œ
11653 μ†ŒμΈμˆ˜λΆ„ν•΄ πŸ“œ
11655 ROT13 πŸ“œ
11656 접미사 λ°°μ—΄ μ •λ ¬ πŸ“œ
11722 κ°€μž₯ κΈ΄ κ°μ†Œν•˜λŠ” λΆ€λΆ„ μˆ˜μ—΄ DP πŸ“œ
11724 μ—°κ²° μš”μ†Œμ˜ 개수 DFS πŸ“œ
11725 트리의 λΆ€λͺ¨ μ°ΎκΈ° BFS, DFS πŸ“œ, πŸ“œDFS방법
11726 2Γ—n 타일링 DP πŸ“œ
11727 2Γ—n 타일링 2 DP πŸ“œ
11729 ν•˜λ…Έμ΄ 탑 이동 μˆœμ„œ μž¬κ·€ πŸ“œ
13023 ABCDE πŸ“œ
13398 연속합 2 DP πŸ“œ
13549 μˆ¨λ°”κΌ­μ§ˆ 3 BFS πŸ“œ
13913 μˆ¨λ°”κΌ­μ§ˆ 4 BFS, λ°±νŠΈλž˜ν‚Ή πŸ“œ
14002 κ°€μž₯ κΈ΄ μ¦κ°€ν•˜λŠ” λΆ€λΆ„ μˆ˜μ—΄ 4✨ DP πŸ“œ
14226 이λͺ¨ν‹°μ½˜ BFS πŸ“œ
14500 ν…ŒνŠΈλ‘œλ―Έλ…Έ πŸ“œ
14501 퇴사 DP πŸ“œDP 풀이, πŸ“œμž¬κ·€ 풀이
14503 λ‘œλ΄‡ μ²­μ†ŒκΈ°πŸ€” DFS πŸ“œ
14889 μŠ€νƒ€νŠΈμ™€ 링크 πŸ“œ
15353 큰 수 A+B (2) πŸ“œ
15649 Nκ³Ό M (1) πŸ“œ
15650 Nκ³Ό M (2) πŸ“œ
15651 Nκ³Ό M (3) πŸ“œ
15652 Nκ³Ό M (4) πŸ“œ
15654 Nκ³Ό M (5) πŸ“œ
15655 Nκ³Ό M (6) πŸ“œ
15656 Nκ³Ό M (7) πŸ“œ
15657 Nκ³Ό M (8) πŸ“œ
15661 링크와 μŠ€νƒ€νŠΈ πŸ“œ
15663 Nκ³Ό M (9) 쀑볡 제거 방식을 쑰금 λ‹€λ₯΄κ²Œ ν•΄ 봀음 πŸ“œ
15664 Nκ³Ό M (10) πŸ“œ
15665 Nκ³Ό M (11) πŸ“œ
15666 Nκ³Ό M (12) πŸ“œ
15988 1, 2, 3 λ”ν•˜κΈ° 3 DP πŸ“œ
15990 1, 2, 3 λ”ν•˜κΈ° 5 DP πŸ“œ
16194 μΉ΄λ“œ κ΅¬λ§€ν•˜κΈ° 2 DP πŸ“œ
16918 봄버맨 πŸ“œ
16929 Two Dots DFS πŸ“œ
16940 BFS μŠ€νŽ˜μ…œ 저지 BFS πŸ“œ
16947 μ„œμšΈ μ§€ν•˜μ²  2ν˜Έμ„  DFS, BFS πŸ“œ
16964 DFS μŠ€νŽ˜μ…œ 저지 DFS πŸ“œ
17087 μˆ¨λ°”κΌ­μ§ˆ 6 gcd (μ΅œλŒ€κ³΅μ•½μˆ˜) πŸ“œ
17103 κ³¨λ“œλ°”ν νŒŒν‹°μ…˜ λ²”μœ„ λ‚΄μ˜ λͺ¨λ“  μ†Œμˆ˜ κ΅¬ν•˜κΈ°, μ—λΌν† μŠ€ν…Œλ„€μŠ€μ˜ 체 πŸ“œ
17298 였큰수 Stack πŸ“œ
17299 μ˜€λ“±ν°μˆ˜ Stack πŸ“œ
17404 RGB거리 2 DP πŸ“œ
17413 단어 뒀집기 2 Stack πŸ“œ

⏫To the top

LeetCode

No. Name Group Memo Solution
1 Two Sum πŸ“œ
5 Longest Palindromic Substring DP πŸ“œπŸ‘€βœ
20 Valid Parentheses πŸ“œ
42 Trapping Rain Water Two Pointers πŸ“œπŸ‘€βœ
45 Jump Game II DP πŸ“œ
53 Maximum Subarray DP later, try this problem with divide and conquer πŸ“œ
55 Jump Game DP πŸ“œ, πŸ“œπŸ‘€
62 Unique Paths DP πŸ“œ
63 Unique Paths II DP πŸ“œ
64 Minimum Path Sum DP πŸ“œ
70 Climbing Stairs πŸ“œ
91 Decode Ways✨ DP 문제λ₯Ό μ½μœΌλ©΄μ„œ λ°˜λ‘€λ₯Ό 꼼꼼히 μƒκ°ν•΄μ„œ 각 μΌ€μ΄μŠ€λ₯Ό ꡬ뢄해 κ°€λ©΄μ„œ ν’€μ—ˆλ”λ‹ˆ ν•œ λ²ˆλ§Œμ— λ§žμ•˜λ‹€γ…Žγ…Ž πŸ“œ
96 Unique Binary Search Trees DP πŸ“œ
104 Maximum Depth of Binary Tree recursion, tree πŸ“œ
118 Pascal's Triangle DP πŸ“œ
119 Pascal's Triangle II DP πŸ“œ
120 Triangle DP 931번 λ¬Έμ œμ™€ λΉ„μŠ· πŸ“œ
121 Best Time to Buy and Sell Stock DP DP에 μ΄λ ‡κ²Œ ν’€ 수 μžˆλŠ” 문제 λ§Žμ€λ“― (μ°Έκ³  : 121, 1014) πŸ“œ, πŸ“œbetter runtime
122 Best Time to Buy and Sell Stock II DP πŸ“œ
136 Single Number bit manipulation πŸ“œ
139 Word BreakπŸ€” DP πŸ“œπŸ‘€βœ
145 Binary Tree Postorder Traversal πŸ“œ
152 Maximum Product Subarray✨ DP πŸ“œ
162 Find Peak Element πŸ“œ
198 House RobberπŸ€” DP wrong several times πŸ“œ
206 Reverse Linked List recursion, linked list πŸ“œ , πŸ“œwith recursion
213 House Robber II DP πŸ“œ
221 Maximal Square DP πŸ“œπŸ‘€
237 Delete Node in a Linked List πŸ“œ
264 Ugly Number II DP πŸ“œ
283 Move Zeroes πŸ“œ
300 Longest Increasing Subsequence DP πŸ“œ
304 Range Sum Query 2D - Immutable DP 1314번 λ¬Έμ œμ™€ λΉ„μŠ·ν•¨ πŸ“œ
309 Best Time to Buy and Sell Stock with Cooldown DP πŸ“œπŸ‘€βœ
338 Counting Bits DP πŸ“œ
344 Reverse String πŸ“œ
376 Wiggle Subsequence DP πŸ“œ
392 Is Subsequence πŸ“œ
412 Fizz Buzz πŸ“œ
413 Arithmetic Slices DP πŸ“œ
509 Fibonacci Number DP πŸ“œ
516 Longest Palindromic Subsequence DP πŸ“œ
611 Valid Triangle Number πŸ“œ
709 To Lower Case string πŸ“œ
714 Best Time to Buy and Sell Stock with Transaction Fee DP 309번과 λΉ„μŠ·ν•˜κ²Œ ν’€μŒ πŸ“œ
740 Delete and Earn DP πŸ“œ
746 Min Cost Climbing Stairs DP πŸ“œ, πŸ“œ0ms Runtime Solution
804 Unique Morse Code Words string πŸ“œ
844 Backspace String Compare stack πŸ“œ
894 All Possible Full Binary Trees μ–΄λ €μ› μŒ πŸ“œ
918 Maximum Sum Circular SubarrayπŸ€” DP πŸ“œπŸ‘€βœ
921 Minimum Add to Make Parentheses Valid stack πŸ“œ
931 Minimum Falling Path Sum DP 120번 λ¬Έμ œμ™€ λΉ„μŠ·ν•¨ πŸ“œ
1004 Max Consecutive Ones III Sliding Window πŸ“œ
1014 Best Sightseeing Pair DP DP에 μ΄λ ‡κ²Œ ν’€ 수 μžˆλŠ” 문제 λ§Žμ€λ“― (μ°Έκ³  : 121, 1014) πŸ“œπŸ‘€
1021 Remove Outermost Parentheses stack πŸ“œ
1043 Partition Array for Maximum SumπŸ€” DP πŸ“œ
1047 Remove All Adjacent Duplicates In String stack πŸ“œ
1108 Defanging an IP Address πŸ“œ
1137 N-th Tribonacci Number DP πŸ“œ
1221 Split a String in Balanced Strings string πŸ“œ
1249 Minimum Remove to Make Valid Parentheses stack πŸ“œ
1277 Count Square Submatrices with All Ones DP πŸ“œ
1304 Find N Unique Integers Sum up to Zero πŸ“œ, πŸ“œbest solution
1314 Matrix Block Sum DP πŸ“œ
1470 Shuffle the Array πŸ“œ
1480 Running Sum of 1d Array πŸ“œ
1512 Number of Good Pairs πŸ“œ
1528 Shuffle String string πŸ“œ
1567 Maximum Length of Subarray With Positive Product DP πŸ“œ
1598 Crawler Log Folder πŸ“œ
1662 Check If Two String Arrays are Equivalent string πŸ“œ
1641 Count Sorted Vowel Strings DP πŸ“œ
1678 Goal Parser Interpretation string πŸ“œ
1684 Count the Number of Consistent Strings string πŸ“œ
1704 Determine if String Halves Are Alike string πŸ“œ
1773 Count Items Matching a Rule string πŸ“œ
1816 Truncate Sentence string πŸ“œ
1832 Check if the Sentence Is Pangram string πŸ“œ
1844 Replace All Digits with Characters string πŸ“œ
1859 Sorting the Sentence string πŸ“œ
2000 Reverse Prefix of Word string πŸ“œ

⏫To the top

About

yarncha's Algorithm Problem Solving😊

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages