목록PS/LeetCode (370)
넘치게 채우기
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 문제 유형 : 배열 문..
https://leetcode.com/problems/insert-delete-getrandom-o1/description/ Insert Delete GetRandom O(1) - LeetCode Can you solve this real interview question? Insert Delete GetRandom O(1) - Implement the RandomizedSet class: * RandomizedSet() Initializes the RandomizedSet object. * bool insert(int val) Inserts an item val into the set if not present. Returns true if th leetcode.com 문제 유형 : OOP / 배열 문..
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 문제 유형 : 수학 문제 난이도 : Medium 문제 Implement pow(x, n), which cal..
https://leetcode.com/problems/h-index/description/?envType=study-plan-v2&envId=top-interview-150 H-Index - LeetCode Can you solve this real interview question? H-Index - Given an array of integers citations where citations[i] is the number of citations a researcher received for their ith paper, return the researcher's h-index. According to the definition of h-index on W leetcode.com 문제 유형 : 배열 문..
https://leetcode.com/problems/ransom-note/description/?envType=study-plan-v2&envId=top-interview-150 Ransom Note - LeetCode Can you solve this real interview question? Ransom Note - Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise. Each letter in magazine can only be used once in ranso leetcode.com 문제 유..
https://leetcode.com/problems/number-of-longest-increasing-subsequence/description/ Number of Longest Increasing Subsequence - LeetCode Can you solve this real interview question? Number of Longest Increasing Subsequence - Given an integer array nums, return the number of longest increasing subsequences. Notice that the sequence has to be strictly increasing. Example 1: Input: nums = [ leetcode...
https://leetcode.com/problems/jump-game-ii/description/ Jump Game II - LeetCode Can you solve this real interview question? Jump Game II - You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0]. Each element nums[i] represents the maximum length of a forward jump from index i. In other wo leetcode.com 문제 유형 : 배열 문제 난이도 : Medium 문제 You are given a 0-..
https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/description/ All Nodes Distance K in Binary Tree - LeetCode Can you solve this real interview question? All Nodes Distance K in Binary Tree - Given the root of a binary tree, the value of a target node target, and an integer k, return an array of the values of all nodes that have a distance k from the target node. leetcode.com 문제 ..
https://leetcode.com/problems/minimum-depth-of-binary-tree/description/ Minimum Depth of Binary Tree - LeetCode Can you solve this real interview question? Minimum Depth of Binary Tree - Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf is a no leetcode.com 문제 유형 : BFS / DFS..
https://leetcode.com/problems/jump-game/description/ Jump Game - LeetCode Can you solve this real interview question? Jump Game - You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Return true if you can leetcode.com 문제 유형 : 배열 문제 난이도 : Medium 문제 You are given an integer..