All Posts

Leetcode 2423: Remove Letter To Equalize Frequency

You are given a string consisting of lowercase English letters. You must remove one letter from the string so that the frequency of all remaining letters is equal. Return true if it is possible to achieve this by removing exactly one letter, otherwise return false.

Leetcode 2427: Number of Common Factors

You are given two positive integers, a and b. Your task is to find the number of common divisors (factors) between a and b. A number x is considered a common divisor of a and b if it divides both a and b without leaving any remainder.

Leetcode 2432: The Employee That Worked on the Longest Task

You are given a group of employees, each identified by a unique ID. A series of tasks have been completed, where each task has a specific start and end time. Your task is to identify which employee worked the longest on a task. If there is a tie between multiple employees, return the one with the smallest ID. The time for each task is calculated by subtracting the start time from the end time, and each task starts right after the previous one ends.

Leetcode 2437: Number of Valid Clock Times

You are given a string time representing the current time on a 24-hour digital clock in the format ‘hh:mm’, where some digits are replaced with the ‘?’ symbol. The ‘?’ character can be replaced with any digit from 0 to 9. Your task is to return the total number of valid clock times that can be formed by replacing all ‘?’ characters in the string.

Leetcode 2441: Largest Positive Integer That Exists With Its Negative

You are given an integer array nums where each element is non-zero. Your task is to find the largest positive integer k such that its negative counterpart -k also exists in the array. Return the largest such k. If no such integer exists, return -1.

Leetcode 2446: Determine if Two Events Have Conflict

Given two events, each with a start time and end time in the HH:MM format, determine if the two events overlap at any point in time. Return true if there is any overlap, otherwise return false.