Leetcode 279

[Binary Tree-DFS][Medium] Path Sum III

https://leetcode.com/problems/path-sum-iii/description Path Sum III - LeetCode Can you solve this real interview question? Path Sum III - Given the root of a binary tree and an integer targetSum, return the number of paths where the sum of the values along the path equals targetSum. The path does not need to start or end at the roo leetcode.com Q. Tree 노드가 주어질때, 해당 노드의 leaf를 향하는 연속된 구간합이 targetS..

Leetcode/Challenges 2023.12.24

[Binary Tree][DFS] [Easy] 872. Leaf-Similar Trees

https://leetcode.com/problems/leaf-similar-trees/description Leaf-Similar Trees - LeetCode Can you solve this real interview question? Leaf-Similar Trees - Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequence. [https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/16/tree.png leetcode.com Q. 두 노드가 주어질때, 해당 노드의 leaf node를 한쪽에서 읽..

Leetcode/LeetCode75 2023.12.21

[Binary Tree][Easy] 104. Maximum Depth of Binary Tree

https://leetcode.com/problems/maximum-depth-of-binary-tree/description Maximum Depth of Binary Tree - LeetCode Can you solve this real interview question? Maximum Depth of Binary Tree - Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf leetcode.com Q. 입력된 이진트리의 최대 dep..

Leetcode/LeetCode75 2023.12.20

[Linked List][Medium] 2130. Maximum Twin Sum of a Linked List

https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/description Maximum Twin Sum of a Linked List - LeetCode Can you solve this real interview question? Maximum Twin Sum of a Linked List - In a linked list of size n, where n is even, the ith node (0-indexed) of the linked list is known as the twin of the (n-1-i)th node, if 0 next; fast = fast->next->next; } // 전반부는 뒤집는다. ListNode* ri..

Leetcode/LeetCode75 2023.12.19

[Linked List][Easy] 206. Reverse Linked List

https://leetcode.com/problems/reverse-linked-list/description Reverse Linked List - LeetCode Can you solve this real interview question? Reverse Linked List - Given the head of a singly linked list, reverse the list, and return the reversed list. Example 1: [https://assets.leetcode.com/uploads/2021/02/19/rev1ex1.jpg] Input: head = [1,2,3,4,5] O leetcode.com Q. 주어진 노드를 뒤집고, 그 head를 반환하라. Solution..

Leetcode/LeetCode75 2023.12.18

[Linked List][Medium] 328. Odd Even Linked List

https://leetcode.com/problems/odd-even-linked-list/description Odd Even Linked List - LeetCode Can you solve this real interview question? Odd Even Linked List - Given the head of a singly linked list, group all the nodes with odd indices together followed by the nodes with even indices, and return the reordered list. The first node is considered od leetcode.com Q. input list head가 주어질때, 홀수끼리먼저 ..

Leetcode/LeetCode75 2023.12.17

[Linked List][Medium] 2095. Delete the Middle Node of a Linked List

https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/description Delete the Middle Node of a Linked List - LeetCode Can you solve this real interview question? Delete the Middle Node of a Linked List - You are given the head of a linked list. Delete the middle node, and return the head of the modified linked list. The middle node of a linked list of size n is the ⌊n / leetcode.c..

Leetcode/LeetCode75 2023.12.16

[Stack][Medium] 394. Decode String

https://leetcode.com/problems/decode-string/description Decode String - LeetCode Can you solve this real interview question? Decode String - Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is g leetcode.com Q. k[string] 꼴의 입력이 들어올때, string을 k번 출력하게 디코딩 하..

Leetcode/Challenges 2023.12.14