You are given two arrays nums1 and nums2, both containing positive integers. Some elements in the arrays are zeros, which need to be replaced with strictly positive integers. The goal is to make the sums of both arrays equal by replacing the zeros in such a way that the resulting sums are the same. Return the minimum possible sum that can make the sums of both arrays equal, or return -1 if it is impossible.
You are given a 0-indexed integer array nums of length n and an integer k. You can perform an operation where you pick an index i in the range [0, n - 1] and increment nums[i] by 1. You can perform this operation any number of times (including zero). A subarray is considered beautiful if, for every subarray of size 3 or more, the maximum element in that subarray is greater than or equal to k. Your task is to return the minimum number of increment operations needed to make the array beautiful.
In a tournament, there are ’n’ teams, each represented by an index from 0 to n-1. You are given a 2D boolean matrix grid of size n x n, where the value at grid[i][j] is 1 if team ‘i’ is stronger than team ‘j’, and 0 otherwise. Your task is to determine the champion team, which is the team that no other team is stronger than.
You are given a 0-indexed array ’nums’. A pair of integers ‘x’ and ‘y’ is called a strong pair if it satisfies the condition |x - y| <= min(x, y). Your task is to find two integers from ’nums’ that form a strong pair and have the highest possible bitwise XOR value among all strong pairs in the array. You can pick the same integer twice.
You are given a 2D array, access_times, where each entry contains an employee’s name and their system access time in 24-hour format (HHMM). An employee is considered ‘high-access’ if they accessed the system at least three times within any one-hour window. The task is to identify all such high-access employees and return their names.
You are given two integer arrays, nums1 and nums2, both having length n. You are allowed to perform a series of operations (possibly none). In each operation, you can select an index i in the range [0, n-1] and swap the values of nums1[i] and nums2[i]. The goal is to satisfy two conditions: the last element of nums1 is equal to the maximum value in nums1, and the last element of nums2 is equal to the maximum value in nums2. Return the minimum number of operations required, or -1 if it’s impossible to satisfy both conditions.