profile
π™Žπ™ˆπ˜Όπ™‡π™‡ π™Žπ™π™€π™‹π™Ž 𝙀𝙑𝙀𝙍𝙔 π˜Ώπ˜Όπ™”
post-thumbnail

[Leet Code] Number of Subarrays with Bounded Maximum

μ£Όμ–΄μ§„ `nums` λ°°μ—΄μ˜ λΆ€λΆ„ λ°°μ—΄ μ€‘μ—μ„œ λΆ€λΆ„ λ°°μ—΄μ˜ `max` 값이 `left <= max <= right` 인 λΆ€λΆ„ λ°°μ—΄μ˜ 개수λ₯Ό ꡬ해 return ν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 6μ›” 17일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Generate Parentheses

Input으둜 μ£Όμ–΄μ§€λŠ” `n` 개의 κ΄„ν˜Έκ°€ ν¬ν•¨λœ `string` 듀을 List ν˜•νƒœλ‘œ return ν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 6μ›” 16일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Matchsticks to Square

μ£Όμ–΄μ§„ `matchsticks` 둜 μ‚¬κ°ν˜•μ„ λ§Œλ“€ 수 μžˆλŠ”μ§€ μ—¬λΆ€λ₯Ό `true` / `false` 둜 returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€. 단, `matchsticks` 의 μ›μ†Œλ“€μ€ 길이λ₯Ό 자λ₯Ό 수 μ—†μŠ΅λ‹ˆλ‹€.

2021λ…„ 6μ›” 16일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Maximum Units on a Truck

μ£Όμ–΄μ§„ `boxTypes` λ°°μ—΄μ—μ„œ i번째 λ°°μ—΄μ˜ 0번째 인덱슀 값은 box의 개수이고, 1번째 인덱슀 값은 ν•΄λ‹Ή box μ•ˆμ— λ“€μ–΄μžˆλŠ” unit κ°œμˆ˜μž…λ‹ˆλ‹€. `truckSize` λ„˜μ§€ μ•Šλ„λ‘ boxλ₯Ό νŠΈλŸ­μ— μ‹€μ—ˆμ„ λ•Œ μ΅œλŒ€ unit의 수λ₯Ό returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 6μ›” 14일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Search Suggestions System

μ£Όμ–΄μ§„ `searchWord` 의 첫 κΈ€μžλΆ€ν„° μ°¨λ‘€λŒ€λ‘œ μ‹œμž‘ν•˜λŠ” `products` λ₯Ό μ΅œλŒ€ 3κ°œκΉŒμ§€ μ°Ύμ•„ List에 μ €μž₯ν•΄μ„œ returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€. 즉, List의 0번 인덱슀 ListλŠ” `searchWord` 의 첫 κΈ€μžλ‘œ μ‹œμž‘ν•˜λŠ” λ‹¨μ–΄λ“€λ‘œ 이루어져 μžˆμŠ΅λ‹ˆλ‹€.

2021λ…„ 6μ›” 1일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Maximum Gap

`nums` 배열을 μ •λ ¬ν•œ 후에 μΈμ ‘ν•œ 인덱슀의 `gap` 이 κ°€μž₯ 큰 값을 μ°Ύμ•„μ„œ returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 31일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] N Queens II

`n x n` λ°°μ—΄ μ•ˆμ—μ„œ `n` 개의 퀸이 μ„œλ‘œ 곡격할 수 μ—†λŠ” μœ„μΉ˜μ— 놓일 수 μžˆλ„λ‘ λ°°μΉ˜ν•˜λŠ” λ°©λ²•μ˜ 개수λ₯Ό λͺ¨λ‘ μ°Ύμ•„ returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 31일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Evaluate Reverse Polish Notation

μ£Όμ–΄μ§„ `tokens` λ₯Ό ν›„μœ„ μ—°μ‚°ν•œ 값을 returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 25일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Binary Tree Level Order Traversal

μ£Όμ–΄μ§„ `Binary Tree` μ—μ„œ `level` λ³„λ‘œ `node` 의 `value` λ₯Ό λ¦¬μŠ€νŠΈμ— λ„£μ–΄μ„œ returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 20일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Minimum Moves to Equal Array Elements II

μ£Όμ–΄μ§„ `nums` λ°°μ—΄μ—μ„œ ν•΄λ‹Ή μˆ«μžλ“€μ„ λ™μΌν•œ 숫자둜 λ§Œλ“€μ–΄μ•Όν•©λ‹ˆλ‹€. κ·Έ κ³Όμ •μ—μ„œ κ°€μž₯ 적은 횟수λ₯Ό returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 20일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Find Duplicate File in System

μ£Όμ–΄μ§€λŠ” `paths` 에 directory 별 νŒŒμΌλ“€κ³Ό ν•΄λ‹Ή νŒŒμΌλ“€μ— ν¬ν•¨λ˜μ–΄μžˆλŠ” μ½˜ν…μΈ λ“€μ΄ μ ν˜€μžˆμŠ΅λ‹ˆλ‹€. κ·Έ 쀑 μ½˜ν…μΈ κ°€ μ€‘λ³΅λ˜λŠ” 파일의 경둜λ₯Ό return ν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 19일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Longest String Chain

μ£Όμ–΄μ§„ `words` μ—μ„œ λ¬Έμžμ—΄λΌλ¦¬ 연관성이 μžˆλŠ” `chain` 관계λ₯Ό μ°Ύμ•„μ„œ κ°€μž₯ κΈ΄ `chain` 의 길이λ₯Ό returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 18일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Binary Tree Cameras

μ£Όμ–΄μ§„ 트리의 λ…Έλ“œλ₯Ό 카메라λ₯Ό μ„€μΉ˜ν•΄μ„œ λͺ¨λ‘ λͺ¨λ‹ˆν„°λ§ν•΄μ•Ό ν•©λ‹ˆλ‹€. 카메라가 μ„€μΉ˜λ˜λ©΄ λΆ€λͺ¨ λ…Έλ“œμ™€ λ°”λ‘œ μ•„λž˜ μžμ‹ λ…Έλ“œλ“€μ„ λͺ¨λ‹ˆν„°λ§ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 λ•Œ, ν•„μš”ν•œ μΉ΄λ©”λΌμ˜ μ΅œμ†Œ 개수λ₯Ό returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 17일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Valid Number

μ£Όμ–΄μ§„ λ¬Έμžμ—΄ `s` κ°€ μœ νš¨ν•œ `Integer` λ˜λŠ” `Decimal` 인지 ν™•μΈν•˜μ—¬ `true` , `false` λ₯Ό returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 16일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Ambiguous Coordinates

μ£Όμ–΄μ§„ λ¬Έμžμ—΄ `s` 둜 λ§Œλ“€ 수 μžˆλŠ” μœ νš¨ν•œ μ •μˆ˜ λ˜λŠ” μ‹€μˆ˜ μŒμ„ returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 14일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Range Sum Query 2D - Immutable

μ£Όμ–΄μ§„ `matix` μ—μ„œ λ²”μœ„μ˜ μ™Όμͺ½ μƒλ‹¨μ˜ row, column κ³Ό 였λ₯Έμͺ½ ν•˜λ‹¨μ˜ row, column이 μ£Όμ–΄μ§€λ©΄ κ·Έ λ²”μœ„ 숫자의 합을 κ΅¬ν•΄μ„œ return ν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 13일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Maximum Points You Can Obtain from Cards

μ£Όμ–΄μ§„ `cardPoints` λ°°μ—΄μ—μ„œ κ°€μž₯ 처음 μš”μ†Œ λ˜λŠ” κ°€μž₯ λ§ˆμ§€λ§‰ μš”μ†Œλ₯Ό ν¬ν•¨ν•˜κ³ , μ—°μ†λœ μœ„μΉ˜μ— μžˆλŠ” `k` 개의 μˆ˜λ“€ 쀑 κ°€μž₯ 큰 값을 μ°Ύμ•„ return ν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 12일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Count Primes

n κΉŒμ§€μ˜ 수 μ€‘μ—μ„œ μ†Œμˆ˜μ˜ 개수λ₯Ό return ν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 11일
Β·
2개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Construct Target Array With Multiple Sums

target λ°°μ—΄μ˜ 길이와 같은 start 배열은 μ΄ˆκΈ°μ—λŠ” 1둜만 κ΅¬μ„±λ˜μ–΄μžˆμŠ΅λ‹ˆλ‹€.이 start λ°°μ—΄μ˜ ν•©μœΌλ‘œ λ°°μ—΄ μ•ˆμ˜ μš”μ†Œλ“€μ„ λ°”κΏ”κ°€λ©΄μ„œ μ΅œμ’…μ μœΌλ‘œ target 을 λ§Œλ“€ 수 μžˆλŠ”μ§€ true, false λ₯Ό return ν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 10일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Leet Code] Super Palindromes

palindrom 은 μ‰½κ²Œ λ§ν•΄μ„œ ' μ•žλ’€κ°€ λ˜‘κ°™μ€ 단어 ' μž…λ‹ˆλ‹€. λ¬Έμ œλŠ” left <= num < right 의 λ²”μœ„μ—μ„œ num κ³Ό num의 제곱근 λͺ¨λ‘κ°€ palindrom 인 숫자의 개수λ₯Ό μ°Ύμ•„μ„œ returnν•˜λŠ” λ¬Έμ œμž…λ‹ˆλ‹€.

2021λ…„ 5μ›” 9일
Β·
0개의 λŒ“κΈ€
Β·