All Posts

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.

Leetcode 1297: Maximum Number of Occurrences of a Substring

Given a string s, return the maximum number of occurrences of any substring that satisfies the following conditions: The number of unique characters in the substring must be less than or equal to maxLetters, and the substring length must be between minSize and maxSize inclusive.

Leetcode 1311: Get Watched Videos by Your Friends

You are given n people with unique IDs and two lists: watchedVideos and friends. For a given ID and a level k, find the list of videos watched by people at exactly level k from you. Return the videos ordered by their frequency (in increasing order), and alphabetically if there is a tie in frequency.

Leetcode 1338: Reduce Array Size to The Half

You are given an integer array arr. You can choose a set of integers and remove all occurrences of these integers. Your task is to return the minimum size of the set such that at least half of the integers of the array are removed.

Leetcode 1347: Minimum Number of Steps to Make Two Strings Anagram

You are given two strings s and t of the same length. In one step, you can choose any character of t and replace it with another character. Return the minimum number of steps to make t an anagram of s.

Leetcode 1348: Tweet Counts Per Frequency

A social media company wants to analyze tweet activity by counting the number of tweets in given time periods, broken down by minute, hour, or day frequency. Design an API to record tweets and calculate the number of tweets within specific time intervals.