개발/Leetcode
-
Leetcode 1870. Minimum Speed to Arrive on Time개발/Leetcode 2023. 7. 26. 10:43
https://leetcode.com/problems/minimum-speed-to-arrive-on-time/description/ Minimum Speed to Arrive on Time - LeetCode Can you solve this real interview question? Minimum Speed to Arrive on Time - You are given a floating-point number hour, representing the amount of time you have to reach the office. To commute to the office, you must take n trains in sequential order. Yo leetcode.com 문제 부동소수점인 ..
-
Leetcode 852. Peak Index in a Mountain Array개발/Leetcode 2023. 7. 25. 09:36
https://leetcode.com/problems/peak-index-in-a-mountain-array/description/ Peak Index in a Mountain Array - LeetCode Can you solve this real interview question? Peak Index in a Mountain Array - An array arr a mountain if the following properties hold: * arr.length >= 3 * There exists some i with 0 < i < arr.length - 1 such that: * arr[0] < arr[1] < ... < arr[i - 1] < arr leetcode.com 문제 주어진 배열 다음..
-
Leetcode 50. Pow(x, n)개발/Leetcode 2023. 7. 24. 12:36
https://leetcode.com/problems/powx-n/description/ Pow(x, n) - LeetCode Can you solve this real interview question? Pow(x, n) - Implement pow(x, n) [http://www.cplusplus.com/reference/valarray/pow/], which calculates x raised to the power n (i.e., xn). Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Inpu leetcode.com 문제 pow(x,n) x의 n승을 계산하는 함수를 구현하여라 코드 class Solution: def myP..
-
Leetcode 735. Asteroid Collision개발/Leetcode 2023. 7. 20. 09:46
https://leetcode.com/problems/asteroid-collision/description/ Asteroid Collision - LeetCode Can you solve this real interview question? Asteroid Collision - We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning leetcode.com 문제 소행성의 정보를 정수로 담고 있는 asteroids 배열이 ..
-
Leetcode 435. Non-overlapping Intervals개발/Leetcode 2023. 7. 19. 10:56
https://leetcode.com/problems/non-overlapping-intervals/description/ Non-overlapping Intervals - LeetCode Can you solve this real interview question? Non-overlapping Intervals - Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. leetcode.com 문제 간격의 정보가 들어있는 배열 inte..
-
Leetcode 146. LRU Cache개발/Leetcode 2023. 7. 18. 09:38
https://leetcode.com/problems/lru-cache/description/ LRU Cache - LeetCode Can you solve this real interview question? LRU Cache - Design a data structure that follows the constraints of a Least Recently Used (LRU) cache [https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU]. Implement the LRUCache class: * LRUCache(int c leetcode.com 문제 Least Recentry Used (LRU) cache(https://en.wikipedi..
-
Leetcode 445. Add Two Numbers II개발/Leetcode 2023. 7. 17. 12:12
https://leetcode.com/problems/add-two-numbers-ii/description/ Add Two Numbers II - LeetCode Can you solve this real interview question? Add Two Numbers II - You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contains a single digit. Add the two numbers an leetcode.com 문제 모든 노드가 양수이고 비어있지 않은 LinkedList가 2..
-
Leetcode 1125. Smallest Sufficient Team개발/Leetcode 2023. 7. 16. 11:14
https://leetcode.com/problems/smallest-sufficient-team/description/ Smallest Sufficient Team - LeetCode Can you solve this real interview question? Smallest Sufficient Team - In a project, you have a list of required skills req_skills, and a list of people. The ith person people[i] contains a list of skills that the person has. Consider a sufficient team: a leetcode.com 문제 프로젝트를 하기위해 필요한 기술이 나열되..