 Group the People Given the Group Size They Belong To in Python

Problem:  There are n people whose IDs go from 0 to n – 1 and each person belongs exactly to one group. Given the array groupSizes of length n telling the group size each person belongs to, return the groups there are and the people’s IDs each group includes. You can return any solution in any order and … Read more Group the People Given the Group Size They Belong To in Python

Find the Smallest Divisor Given a Threshold in Python

Problem:  Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and sum the result of the division. Find the smallest divisor such that the result mentioned above is less than or equal to threshold. Each result of division is rounded to the nearest integer greater than … Read more Find the Smallest Divisor Given a Threshold in Python

Sequential Digits in Python

Problem:  An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers in the range [low, high] inclusive that have sequential digits. Example: Constraints: Solution:

Find Numbers with Even Number of Digits in Python

Problem:  Given an array nums of integers, return how many of them contain an even number of digits. Example: Constraints: Solution:

Divide Array in Sets of K Consecutive Numbers in Python

Problem:  Given an array of integers nums and a positive integer k, find whether it’s possible to divide this array into sets of k consecutive numbers. Return True if its possible otherwise return False. Example: Constraints: Solution: