All Posts

Leetcode 1268: Search Suggestions System

You are given a list of unique product names and a search word. As each character of the search word is typed, you need to suggest up to three products that have a prefix matching the current search word. If there are more than three products with the same prefix, return the three lexicographically smallest products.

Leetcode 1277: Count Square Submatrices with All Ones

Given a m x n matrix of ones and zeros, count how many square submatrices are filled with all ones.

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 1287: Element Appearing More Than 25% In Sorted Array

Given a sorted integer array, find and return the integer that occurs more than 25% of the time.

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.