All Posts

Leetcode 1282: Group the People Given the Group Size They Belong To

Given an array where each element represents the required size of the group for each person, group the people accordingly and return the groups. Each person must be in exactly one group.

Leetcode 1283: Find the Smallest Divisor Given a Threshold

Given an array of integers and a threshold, find the smallest divisor such that the sum of the division results (rounded up) is less than or equal to the threshold.

Leetcode 1286: Iterator for Combination

Design a CombinationIterator class that generates all combinations of a specified length from a sorted string of distinct lowercase English letters, and allows iterating through them in lexicographical order.

Leetcode 1288: Remove Covered Intervals

Given an array of intervals, remove all intervals that are covered by another interval and return the number of remaining intervals.

Leetcode 1292: Maximum Side Length of a Square with Sum Less than or Equal to Threshold

You are given a matrix of integers and a threshold. Your goal is to find the maximum side length of a square where the sum of the elements inside the square is less than or equal to the threshold.

Leetcode 1296: Divide Array in Sets of K Consecutive Numbers

Given an array of integers nums and a positive integer k, check if it is possible to divide the array into sets of k consecutive numbers.