|
|
1. LeetCode 58. Length of Last Word
( 쿠케캬캬 개발 기록 | 24-04-04 19:46 )
|
<p data-ke-size="size16"><a href="https://leetcode.com/problems/length-of-last-word/description/?" target="_blank" rel="noopener noreferrer">https://leetcode.com/problems/length-of-last-word</a></p> <p... Tag: Algorithm, leetcode |
|
2. LeetCode 205. Isomorphic Strings
( 쿠케캬캬 개발 기록 | 24-04-04 19:46 )
|
<p data-ke-size="size16"><a href="https://leetcode.com/problems/isomorphic-strings/" target="_blank" rel="noopener noreferrer">https://leetcode.com/problems/isomorphic-strings/</a></p> <p data-ke-siz... Tag: Algorithm, leetcode |
|
3. LeetCode 79. Word Search
( 쿠케캬캬 개발 기록 | 24-04-04 19:46 )
|
<p data-ke-size="size16"><a href="https://leetcode.com/problems/word-search/description" target="_blank" rel="noopener noreferrer">https://leetcode.com/problems/word-search/description</a></p> <p data-ke-size="... Tag: Algorithm, leetcode |
|
4. LeetCode 1614. Maximum Nesting Depth of the Parentheses
( 쿠케캬캬 개발 기록 | 24-04-04 19:46 )
|
<p data-ke-size="size16"><a href="https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/" target="_blank" rel="noopener noreferrer">https://leetcode.com/problems/maximum-nesting-depth-of-... Tag: Algorithm, leetcode |
|
5. LeetCode 238. Product of Array Except Self
( 쿠케캬캬 개발 기록 | 24-03-16 15:09 )
|
반응형 https://leetcode.com/problems/product-of-array-except-self O(1)의 공간으로 나눗셈 연산 없이 해결해야 합니다. i번째를 제외한 좌/우측의 prefix product를 구해주면 됩니다. res[i] = 좌_prefix_product[i] * 우_prefix_product[i] class Solution { ... Tag: Algorithm, leetcode |
|
6. LeetCode 525. Contiguous Array
( 쿠케캬캬 개발 기록 | 24-03-16 15:37 )
|
반응형 https://leetcode.com/problems/contiguous-array/description nums[i]가 1이라면 1을, 0이라면 -1을 변수에 더해줍니다. 그리고 각 합에 대한 인덱스를 map에 기억해줍니다. 이후에 순회하면서 해당 합을 다시 가지게 된다면,... Tag: Algorithm, leetcode |
|
7. LeetCode 1669. Merge In Between Linked Lists
( 쿠케캬캬 개발 기록 | 24-03-21 22:17 )
|
반응형 https://leetcode.com/problems/merge-in-between-linked-lists/description list1의 삭제 시작/종료 포인터를 구해서, list2를 끼워넣어줍니다. class Solution { public: ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* l... Tag: Algorithm, leetcode |
|
8. LeetCode 349. Intersection of Two Arrays
( 쿠케캬캬 개발 기록 | 24-03-10 18:24 )
|
반응형 https://leetcode.com/problems/intersection-of-two-arrays 배열에 nums1의 값 여부를 기록해두고, nums2를 순회하며 nums1에도 존재하는 값인지 확인해줍니다. class Solution { public: vector<int> intersection(vector<int>\& nums1, vector<int>... Tag: Algorithm, leetcode |
|
9. LeetCode 3005. Count Elements With Maximum Frequency
( 쿠케캬캬 개발 기록 | 24-03-08 20:12 )
|
반응형 https://leetcode.com/problems/count-elements-with-maximum-frequency class Solution { public: int maxFrequencyElements(vector<int>\& nums) { int cnt[101] = {0}, mx = 0, res = 0; for(int num : nums) mx = max(mx, ++... Tag: Algorithm, leetcode |
|
10. LeetCode 141. Linked List Cycle
( 쿠케캬캬 개발 기록 | 24-03-07 19:51 )
|
반응형 https://leetcode.com/problems/linked-list-cycle/description Linked List Cycle - LeetCode Can you solve this real interview question? Linked List Cycle - Given head, the head of a linked list, determi... Tag: Algorithm, leetcode |
|
11. LeetCode 876. Middle of the Linked List
( 쿠케캬캬 개발 기록 | 24-03-07 19:52 )
|
반응형 https://leetcode.com/problems/middle-of-the-linked-list/ 2개의 포인터를 각각 한 칸, 두 칸씩 이동해줍니다. 두 칸씩 이동한 포인터가 끝에 도달하면, 한 칸씩 이동한 포인터가 중간이 됩니다. class Solution { public: ListNode* middleNode(ListNode* ... Tag: Algorithm, leetcode |
|
12. LeetCode 543. Diameter of Binary Tree
( 쿠케캬캬 개발 기록 | 24-02-29 22:14 )
|
반응형 https://leetcode.com/problems/diameter-of-binary-tree/ Diameter of Binary Tree - LeetCode Can you solve this real interview question? Diameter of Binary Tree - Given the root of a binary tree, return ... Tag: Algorithm, leetcode |
|
13. LeetCode 1609. Even Odd Tree
( 쿠케캬캬 개발 기록 | 24-02-29 23:41 )
|
반응형 https://leetcode.com/problems/even-odd-tree Even Odd Tree - LeetCode Can you solve this real interview question? Even Odd Tree - A binary tree is named Even-Odd if it meets the following conditions: *... Tag: Algorithm, leetcode |
|
14. LeetCode 977. Squares of a Sorted Array
( 쿠케캬캬 개발 기록 | 24-03-02 18:06 )
|
반응형 https://leetcode.com/problems/squares-of-a-sorted-array Squares of a Sorted Array - LeetCode Can you solve this real interview question? Squares of a Sorted Array - Given an integer array nums sorted... Tag: Algorithm, leetcode |
|
15. LeetCode 19. Remove Nth Node From End of List
( 쿠케캬캬 개발 기록 | 24-03-03 12:37 )
|
반응형 https://leetcode.com/problems/remove-nth-node-from-end-of-list Remove Nth Node From End of List - LeetCode Can you solve this real interview question? Remove Nth Node From End of List - Given the head... Tag: Algorithm, leetcode |
|