전체 글 422

[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

[HashMap/Set][Medium] 2352. Equal Row and Column Pairs

https://leetcode.com/problems/equal-row-and-column-pairs/description Equal Row and Column Pairs - LeetCode Can you solve this real interview question? Equal Row and Column Pairs - Given a 0-indexed n x n integer matrix grid, return the number of pairs (ri, cj) such that row ri and column cj are equal. A row and column pair is considered equal if they contain th leetcode.com Q. 해당 모든 행의 값들 순서와 해당..

Leetcode/LeetCode75 2023.12.11