LeetCode 1636. Sort Array by Increasing Frequency
Description https://leetcode.com/problems/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…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/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…
Description https://leetcode.com/problems/reshape-the-matrix/ In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new…
Description https://leetcode.com/problems/minimum-absolute-difference/ Given an array of distinct integers arr, find all pairs of elements with the minimum absolute difference of any two elements. Return a…
Description https://leetcode.com/problems/count-largest-group/ Given an integer n. Each number from 1 to n is grouped according to the sum of its digits. Return how many groups have the…
Description https://leetcode.com/problems/distribute-candies/ Alice has n candies, where the ith candy is of type candyType[i]. Alice noticed that she started to gain weight, so she visited…
Description https://leetcode.com/problems/design-hashset/ Design a HashSet without using any built-in hash table libraries. Implement MyHashSet class: void add(key) Inserts the value key into the HashSet. bool…
Description https://leetcode.com/problems/find-all-duplicates-in-an-array/ Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find…
Description https://leetcode.com/problems/add-digits/ Given an integer num, repeatedly add all its digits until the result has only one digit, and return it.…
Description https://leetcode.com/problems/uncommon-words-from-two-sentences/ We are given two sentences A and B. (A sentence is a string of space separated words. Each word consists only of lowercase letters.) A…
Description https://leetcode.com/problems/complement-of-base-10-integer/ Every non-negative integer N has a binary representation. For example, 5 can be represented as “101” in binary, 11 as “1011” in binary, and so on. Note that…