You are given a list of coin denominations and a target value. Your task is to determine the minimum number of new coin denominations you need to add to the list, so that every integer value from 1 to the target can be formed as a sum of some subset of the coins. A coin denomination can be added if it helps form values that cannot be formed using the existing coins.
You are given two integer arrays, nums1 and nums2, with sizes n and m respectively. Your task is to find the number of indices i such that nums1[i] exists in nums2 and the number of indices i such that nums2[i] exists in nums1. Return both values as an array [answer1, answer2].
You are given an integer array nums and an integer k. The frequency of an element is the number of times it appears in the array. A subarray is called good if the frequency of each element in it is less than or equal to k. Your task is to return the length of the longest good subarray in nums.
You are given an integer array batteryPercentages representing the battery levels of devices. Perform tests on each device in order, testing a device if its battery percentage is greater than 0 and decrementing the battery percentage of all subsequent devices by 1. Return the number of devices that can be tested after performing the operations.
Given a 2D array variables where each element is a list of integers [a, b, c, m], and an integer target, find the indices where the formula (a * b % 10) ^ c % m equals the target. Return a list of these indices.