All Posts

Leetcode 2439: Minimize Maximum of Array

You are given a 0-indexed array nums of length n, where each element represents the number of items in a container. In one operation, you can pick an index i such that 1 <= i < n and nums[i] > 0, and move one item from nums[i] to nums[i-1]. Your goal is to minimize the maximum value in the array nums after performing any number of operations.

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 2442: Count Number of Distinct Integers After Reverse Operations

You are given an array nums consisting of positive integers. For each number in the array, you need to reverse its digits and append the reversed number to the end of the array. After performing this operation for all numbers, return the number of distinct integers in the resulting array.

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.

Leetcode 2447: Number of Subarrays With GCD Equal to K

Given an integer array nums and an integer k, return the number of subarrays in which the greatest common divisor (GCD) of all the elements is exactly k. A subarray is a contiguous non-empty sequence of elements within the array.

Leetcode 2451: Odd String Difference

You are given an array of strings where each string is of the same length. Each string can be converted into a difference array where each element represents the difference between two consecutive characters’ positions in the alphabet. All strings in the array have the same difference array except for one. Your task is to identify the string that has a unique difference array.