알고리즘35 LeetCode - 142. Linked List Cycle II https://leetcode.com/problems/linked-list-cycle-ii/?envType=study-plan&id=level-1 Linked List Cycle II - LeetCode Can you solve this real interview question? Linked List Cycle II - Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null. There is a cycle in a linked list if there is some node in the list that can be r leetcode.com 내 첫번째 풀이 # Def.. 2023. 4. 12. LeetCode - 876. Middle of the Linked List https://leetcode.com/problems/middle-of-the-linked-list/?envType=study-plan&id=level-1 내 첫번째 풀이 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def middleNode(self, head: Optional[ListNode]) -> Optional[ListNode]: # 예외처리 if head==None or head.next==None: return head mid = head # 지금까지의 middle node c.. 2023. 4. 12. LeetCode - 206. Reverse Linked List https://leetcode.com/problems/reverse-linked-list/?envType=study-plan&id=level-1 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 내 풀이 나 이거 못풀었음.. ㅠ .. 2023. 4. 12. LeetCode - 21. Merge Two Sorted Lists https://leetcode.com/problems/merge-two-sorted-lists/?envType=study-plan&id=level-1 Merge Two Sorted Lists - LeetCode Can you solve this real interview question? Merge Two Sorted Lists - You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists leetcode.com 내 풀이 1 # D.. 2023. 4. 12. LeetCode - 392. Is Subsequence https://leetcode.com/problems/is-subsequence/?envType=study-plan&id=level-1 Is Subsequence - LeetCode Can you solve this real interview question? Is Subsequence - Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the original string by deleting some (can be n leetcode.com 내 잘못된 첫 풀이 아.. 빈 string일 경.. 2023. 3. 20. LeetCode - 205. Isomorphic Strings https://leetcode.com/problems/isomorphic-strings/?envType=study-plan&id=level-1 Isomorphic Strings - LeetCode Can you solve this real interview question? Isomorphic Strings - Given two strings s and t, determine if they are isomorphic. Two strings s and t are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replace leetcode.com 첫번째 잘못된 내 풀이 t[i]가.. 2023. 3. 20. 이전 1 2 3 4 5 6 다음