LeetCode 1165. Single-Row Keyboard
Description https://leetcode.com/problems/single-row-keyboard/ There is a special keyboard with all keys in a single row. Given a string keyboard of length 26 indicating the…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/single-row-keyboard/ There is a special keyboard with all keys in a single row. Given a string keyboard of length 26 indicating the…
Description https://leetcode.com/problems/create-target-array-in-the-given-order/ Given two arrays of integers nums and index. Your task is to create target array under the following rules: Initially target array is empty. From…
Description https://leetcode.com/problems/decompress-run-length-encoded-list/ We are given a list nums of integers representing a list compressed with run-length encoding. Consider each adjacent pair of elements [freq,…
Description https://leetcode.com/problems/duplicate-zeros/ Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right. Note…
Description https://leetcode.com/problems/design-parking-system/ Design a parking system for a parking lot. The parking lot has three kinds of parking spaces: big,…
Description https://leetcode.com/problems/number-of-good-pairs/ Given an array of integers nums. A pair (i,j) is called good if nums[i] == nums[j] and i < j. Return the number of good pairs. Example 1: Input: nums = [1,2,3,1,1,3]…
Description https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/ Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is,…
Description https://leetcode.com/problems/subrectangle-queries/ Implement the class SubrectangleQueries which receives a rows x cols rectangle as a matrix of integers in the constructor and supports two…
Description https://leetcode.com/problems/dot-product-of-two-sparse-vectors/ Given two sparse vectors, compute their dot product. Implement class SparseVector: SparseVector(nums) Initializes the object with the vector nums dotProduct(vec) Compute the…
Description https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/ Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the ith kid has. For each kid check if…