You are given a 0-indexed integer array forts representing the positions of several forts. Your goal is to move your army from one of your forts to an empty position and capture enemy forts along the way. The army captures all enemy forts that lie between the starting and destination points, and you want to maximize the number of enemy forts captured.
You are given a 0-indexed circular array of strings words and a target string target. A circular array means that the last element connects to the first one. For any index i, the next element is words[(i + 1) % n] and the previous element is words[(i - 1 + n) % n], where n is the length of the array. Starting at startIndex, you can move to either the next or previous word with one step at a time. Your goal is to find the minimum distance needed to reach the target string from the starting index. If target does not exist in the array, return -1.
Given a positive integer num, determine how many of its digits divide num without leaving a remainder. In other words, for each digit in num, check if num % digit == 0 and count how many digits satisfy this condition.
Given the dimensions and mass of a box, categorize it based on the following conditions: If any dimension is >= 10,000 or the volume is >= 1,000,000,000, the box is ‘Bulky’. If the mass is >= 100, the box is ‘Heavy’. The box can be categorized as ‘Both’, ‘Heavy’, ‘Bulky’, ‘Neither’, or a combination of the categories.
You are given an array of integers sorted in non-decreasing order. Your task is to determine the maximum count between the number of positive integers and the number of negative integers in the array. Zero is not considered positive or negative.