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/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/find-lucky-integer-in-an-array/ Given an array of integers arr, a lucky integer is an integer which has a frequency in the array…
Description https://leetcode.com/problems/fixed-point/ Given an array of distinct integers arr, where arr is sorted in ascending order, return the smallest index i that satisfies arr[i] == i. If…
Description https://leetcode.com/problems/n-repeated-element-in-size-2n-array/ In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times. Return the element…
Description https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/ You are given an m x n binary matrix mat of 1‘s (representing soldiers) and 0‘s (representing civilians). The soldiers are positioned in front of the…