LeetCode 1356. Sort Integers by The Number of 1 Bits
Description https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/ Given an integer array arr. You have to sort the integers in the array in ascending order by the number…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/ Given an integer array arr. You have to sort the integers in the array in ascending order by the number…
Description https://leetcode.com/problems/valid-mountain-array/ Given an array of integers arr, return true if and only if it is a valid mountain array. Recall that arr…
Description https://leetcode.com/problems/string-matching-in-an-array/ Given an array of string words. Return all strings in words which is substring of another word in any order. String words[i] is substring of words[j], if can…
Description https://leetcode.com/problems/special-positions-in-a-binary-matrix/ Given a rows x cols matrix mat, where mat[i][j] is either 0 or 1, return the number of special positions in mat. A position (i,j) is called special if mat[i][j] == 1 and all other elements…
Description https://leetcode.com/problems/monotonic-array/ An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i…
Description https://leetcode.com/problems/find-words-that-can-be-formed-by-characters/ Given a sentence that consists of some words separated by a single space, and a searchWord. You have to check if searchWord is a…
Description https://leetcode.com/problems/how-many-apples-can-you-put-into-the-basket/ You have some apples, where arr[i] is the weight of the i-th apple. You also have a basket that can carry…
Description https://leetcode.com/problems/shift-2d-grid/ Given a 2D grid of size m x n and an integer k. You need to shift the grid k times. In one shift operation: Element…
Description https://leetcode.com/problems/consecutive-characters/ Given a string s, the power of the string is the maximum length of a non-empty substring that contains only…
Description https://leetcode.com/problems/binary-gap/ Given a positive integer n, find and return the longest distance between any two adjacent 1‘s in the binary representation of n. If there are…