목록LeetCode (320)
넘치게 채우기
https://leetcode.com/problems/longest-common-prefix/description/?envType=study-plan-v2&envId=top-interview-150 Longest Common Prefix - LeetCode Can you solve this real interview question? Longest Common Prefix - Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Example 1: Input: strs = ["flower","flow" ..
https://leetcode.com/problems/integer-to-roman/description/?envType=study-plan-v2&envId=top-interview-150 Integer to Roman - LeetCode Can you solve this real interview question? Integer to Roman - Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, 2 is written as II in Roman numeral, just tw leetcode.c..
https://leetcode.com/problems/candy/description/?envType=study-plan-v2&envId=top-interview-150 Candy - LeetCode Can you solve this real interview question? Candy - There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. You are giving candies to these children subjected to the following requirements: * Each leetcode.com 문제 유형 : 그리디 문제 난이..
https://leetcode.com/problems/product-of-array-except-self/?envType=study-plan-v2&envId=top-interview-150 Product of Array Except Self - LeetCode Can you solve this real interview question? Product of Array Except Self - Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix o..
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/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-..