You are given an integer array nums of length n. The task is to find how many valid splits exist in nums. A valid split is defined as an index i such that the sum of the first i + 1 elements is greater than or equal to the sum of the remaining elements from index i + 1 to the end. The split must be at an index where at least one element exists on the right side of i.
You are given a 2D integer array tiles, where each element tiles[i] = [li, ri] represents that all integers from li to ri are painted white on a number line. Additionally, you are given an integer carpetLen, which represents the length of a carpet that can be placed anywhere on the number line. Your task is to return the maximum number of white tiles that can be covered by placing the carpet in a way that it maximizes the number of white tiles covered.
Alice has rented a sequence of floors in a building from bottom to top (inclusive). Some of these floors are designated as special floors where relaxation occurs. You are given an array special that contains the indices of these special floors. Your task is to determine the maximum number of consecutive floors that are not designated as special.
You are given an array of positive integers candidates. Your task is to evaluate the bitwise AND of every possible combination of numbers in the array and return the size of the largest combination where the result of the AND operation is greater than 0. Each number in the array may only be used once in each combination.
You have n bags, each capable of holding a certain number of rocks. You are given two arrays: capacity where capacity[i] is the maximum number of rocks that bag i can hold, and rocks where rocks[i] is the current number of rocks in bag i. You also have additionalRocks which represents the number of rocks you can distribute into the bags. Your goal is to determine the maximum number of bags that can be filled to their capacity after placing the additional rocks in any of the bags.
You are given a list of stock prices where each element represents the stock price on a specific day. The stock prices are given as pairs where the first element is the day number and the second element is the stock price for that day. A line chart can be drawn by plotting these prices on an XY-plane, where the X-axis represents the day and the Y-axis represents the price. Your task is to determine the minimum number of lines required to represent the stock prices as a continuous line chart.