All Posts

Leetcode 1343: Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold

Given an array of integers arr and two integers k and threshold, return the number of subarrays of size k whose average is greater than or equal to the threshold.

Leetcode 1344: Angle Between Hands of a Clock

Given an hour and minute value, return the smaller angle (in degrees) formed between the hour and minute hands of a clock.

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.

Leetcode 1352: Product of the Last K Numbers

Design an algorithm that accepts a stream of integers and retrieves the product of the last k integers in the stream.

Leetcode 1353: Maximum Number of Events That Can Be Attended

You are given a list of events where each event is represented by a pair [startDay, endDay]. Your task is to find the maximum number of events you can attend, ensuring that you attend only one event per day.