본문 바로가기

전체 글1523

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.
leetcode 2643. Row With Maximum Ones https://leetcode.com/problems/row-with-maximum-ones/description/ Row With Maximum Ones - LeetCode Can you solve this real interview question? Row With Maximum Ones - Given a m x n binary matrix mat, find the 0-indexed position of the row that contains the maximum count of ones, and the number of ones in that row. In case there are multiple rows that ha leetcode.com 1234567891011class Solution: d.. 2024. 1. 2.
leetcode 2788. Split Strings by Separator https://leetcode.com/problems/split-strings-by-separator/description/ Split Strings by Separator - LeetCode Can you solve this real interview question? Split Strings by Separator - Given an array of strings words and a character separator, split each string in words by separator. Return an array of strings containing the new strings formed after the splits, excl leetcode.com 123456789class Solut.. 2024. 1. 2.
leetcode 2824. Count Pairs Whose Sum is Less than Target https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target/description/ Count Pairs Whose Sum is Less than Target - LeetCode Can you solve this real interview question? Count Pairs Whose Sum is Less than Target - Given a 0-indexed integer array nums of length n and an integer target, return the number of pairs (i, j) where 0 int: answer = 0 for i in range(len(nums)): for j in range(.. 2024. 1. 2.
leetcode 2729. Check if The Number is Fascinating https://leetcode.com/problems/check-if-the-number-is-fascinating/description/ Check if The Number is Fascinating - LeetCode Can you solve this real interview question? Check if The Number is Fascinating - You are given an integer n that consists of exactly 3 digits. We call the number n fascinating if, after the following modification, the resulting number contains all the digi leetcode.com 1234.. 2023. 12. 29.
leetcode 2903. Find Indices With Index and Value Difference I https://leetcode.com/problems/find-indices-with-index-and-value-difference-i/description/ Find Indices With Index and Value Difference I - LeetCode Can you solve this real interview question? Find Indices With Index and Value Difference I - You are given a 0-indexed integer array nums having length n, an integer indexDifference, and an integer valueDifference. Your task is to find two indices i .. 2023. 12. 28.