본문 바로가기
반응형

분류 전체보기167

[LeetCode 해석 및 풀이] 875. Koko Eating Bananas LeetCode 문제 해석 및 풀이 방법 문제 875. Koko Eating Bananas(바나나 먹는 코코) 바로가기 문제 설명 영문 Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours. Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If the pile has less than k bananas, she ea.. 2024. 4. 21.
[LeetCode 해석 및 풀이] 74. Search a 2D Matrix LeetCode 문제 해석 및 풀이 방법 문제 74. Search a 2D Matrix(2D 행렬에서 찾기) 바로가기 문제 설명 영문 You are given an m x n integer matrix matrix with the following two properties: Each row is sorted in non-decreasing order. The first integer of each row is greater than the last integer of the previous row. Given an integer target, return true if target is in matrix or false otherwise. You must write a solution in O(log(.. 2024. 4. 21.
[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.
반응형