본문 바로가기

LeetCode340

leetcode 1207. Unique Number of Occurrences https://leetcode.com/problems/unique-number-of-occurrences/description/?envType=daily-question&envId=2024-01-17 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 123456789101112class Solution: def uniqueOccurrences(self, arr:.. 2024. 1. 17.
leetcode 2913. Subarrays Distinct Element Sum of Squares I https://leetcode.com/problems/subarrays-distinct-element-sum-of-squares-i/description/ Subarrays Distinct Element Sum of Squares I - LeetCode Can you solve this real interview question? Subarrays Distinct Element Sum of Squares I - You are given a 0-indexed integer array nums. The distinct count of a subarray of nums is defined as: * Let nums[i..j] be a subarray of nums consisting of all the ind.. 2024. 1. 15.
leetcode 3005. Count Elements With Maximum Frequency https://leetcode.com/problems/count-elements-with-maximum-frequency/description/ Count Elements With Maximum Frequency - LeetCode Can you solve this real interview question? Count Elements With Maximum Frequency - You are given an array nums consisting of positive integers. Return the total frequencies of elements in nums such that those elements all have the maximum frequency. The leetcode.com .. 2024. 1. 15.
leetcode 917. Reverse Only Letters https://leetcode.com/problems/reverse-only-letters/description/ Reverse Only Letters - LeetCode Can you solve this real interview question? Reverse Only Letters - Given a string s, reverse the string according to the following rules: * All the characters that are not English letters remain in the same position. * All the English letters (lowercase or leetcode.com 1 2 3 4 5 6 7 8 9 10 11 12 13 14.. 2024. 1. 13.
leetcode 1304. Find N Unique Integers Sum up to Zero https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/description/ Find N Unique Integers Sum up to Zero - LeetCode Can you solve this real interview question? Find N Unique Integers Sum up to Zero - Given an integer n, return any array containing n unique integers such that they add up to 0. Example 1: Input: n = 5 Output: [-7,-1,1,3,4] Explanation: These arrays als leetcode.com 1.. 2024. 1. 10.
leetcode 1636. Sort Array by Increasing Frequency https://leetcode.com/problems/sort-array-by-increasing-frequency/description/ Sort Array by Increasing Frequency - LeetCode Can you solve this real interview question? Sort Array by Increasing Frequency - Given an array of integers nums, sort the array in increasing order based on the frequency of the values. If multiple values have the same frequency, sort them in decreasing o leetcode.com 123c.. 2024. 1. 9.
leetcode 2278. Percentage of Letter in String https://leetcode.com/problems/percentage-of-letter-in-string/description/ Percentage of Letter in String - LeetCode Can you solve this real interview question? Percentage of Letter in String - Given a string s and a character letter, return the percentage of characters in s that equal letter rounded down to the nearest whole percent. Example 1: Input: s = "foobar", l leetcode.com 123class Soluti.. 2024. 1. 8.
leetcode 2500. Delete Greatest Value in Each Row https://leetcode.com/problems/delete-greatest-value-in-each-row/description/ Delete Greatest Value in Each Row - LeetCode Can you solve this real interview question? Delete Greatest Value in Each Row - You are given an m x n matrix grid consisting of positive integers. Perform the following operation until grid becomes empty: * Delete the element with the greatest value from leetcode.com 1234567.. 2024. 1. 7.
leetcode 2706. Buy Two Chocolates https://leetcode.com/problems/buy-two-chocolates/description/ Buy Two Chocolates - LeetCode Can you solve this real interview question? Buy Two Chocolates - You are given an integer array prices representing the prices of various chocolates in a store. You are also given a single integer money, which represents your initial amount of money. You m leetcode.com 1 2 3 4 5 6 7 8 9 10 from itertools .. 2024. 1. 5.
leetcode 2843. Count Symmetric Integers https://leetcode.com/problems/count-symmetric-integers/description/ Count Symmetric Integers - LeetCode Can you solve this real interview question? Count Symmetric Integers - You are given two positive integers low and high. An integer x consisting of 2 * n digits is symmetric if the sum of the first n digits of x is equal to the sum of the last n digits of leetcode.com 123456789101112class Solu.. 2024. 1. 5.
leetcode 2894. Divisible and Non-divisible Sums Difference https://leetcode.com/problems/divisible-and-non-divisible-sums-difference/description/ Divisible and Non-divisible Sums Difference - LeetCode Can you solve this real interview question? Divisible and Non-divisible Sums Difference - You are given positive integers n and m. Define two integers, num1 and num2, as follows: * num1: The sum of all integers in the range [1, n] that are not divisible by.. 2024. 1. 5.
leetcode 2974. Minimum Number Game https://leetcode.com/problems/minimum-number-game/description/ Minimum Number Game - LeetCode Can you solve this real interview question? Minimum Number Game - You are given a 0-indexed integer array nums of even length and there is also an empty array arr. Alice and Bob decided to play a game where in every round Alice and Bob will do one move. Th leetcode.com 1234567891011121314class Solution:.. 2024. 1. 5.