본문 바로가기
반응형

🖥️ 문제 풀이111

[LeetCode 해석 및 풀이] 704. Binary Search LeetCode 문제 해석 및 풀이 방법 문제 704. Binary Search(이진 탐색) 바로가기 문제 설명 영문 Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log n) runtime complexity. 한글 오름차순으로 정렬된 정수 배열 nums와 정수 target이 주어지면, nums에서 target을 찾는 함수를 작성하시오. 타.. 2024. 4. 21.
[LeetCode 해석 및 풀이] 2. Add Two Numbers LeetCode 문제 해석 및 풀이 방법 문제 2. Add Two Numbers(두 숫자 더하) 바로가기 문제 설명 영문 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. 한글 두 음수가 아닌.. 2024. 4. 20.
[LeetCode 해석 및 풀이] 138. Copy List with Random Pointer LeetCode 문제 해석 및 풀이 방법 문제 138. Copy List with Random Pointer(랜덤 포인터가 있는 리스트의 복사) 바로가기 문제 설명 영문 A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null. Construct a deep copy of the list. The deep copy should consist of exactly n brand new nodes, where each new node has its value set to the value of its corre.. 2024. 4. 20.
[LeetCode 해석 및 풀이] 19. Remove Nth Node From End of List LeetCode 문제 해석 및 풀이 방법 문제 19. Remove Nth Node From End of List(리스트 뒤에서 N번째 노드 없애기) 바로가기 문제 설명 영문 Given the head of a linked list, remove the nth node from the end of the list and return its head. Follow up: Could you do this in one pass? 한글 연결 리스트의 head가 주어지면, 뒤에서 n번째 노드를 제거하고 head를 반환하십시오. 제한조건 The number of nodes in the list is sz. 1 2024. 4. 20.
[LeetCode 해석 및 풀이] 143. Reorder List LeetCode 문제 해석 및 풀이 방법 문제 143. Reorder List(재정렬한 리스트) 바로가기 문제 설명 영문 You are given the head of a singly linked-list. The list can be represented as: L0 → L1 → … → Ln - 1 → Ln Reorder the list to be on the following form: L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → … You may not modify the values in the list's nodes. Only nodes themselves may be changed. 한글 단일 연결 리스트의 head가 주어집니다. 리스트는 아래와 같이 나타내집니다 L0 .. 2024. 4. 20.
[LeetCode 해석 및 풀이] 21. Merge Two Sorted Lists LeetCode 문제 해석 및 풀이 방법 문제 21. Merge Two Sorted Lists(두개의 정렬된 연결리스트 합병)바로가기 문제 설명영문You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. 한글두 개의 정렬된 연결리스트의 머리인 list1, list2가 주어집니다. 두 개의 리스트를 하나의 정렬된 리스트로 합치십시오. 리스트는 두 리스트의.. 2024. 4. 19.
반응형