You are given a binary string s consisting of characters ‘0’ and ‘1’. Your task is to split the string into two non-empty substrings (a left substring and a right substring) and return the maximum score that can be achieved by splitting the string. The score is the sum of the number of ‘0’s in the left substring and the number of ‘1’s in the right substring. Find the maximum score by evaluating all possible splits.
You are given an array cardPoints representing the points of cards arranged in a row. In each step, you can pick the first or the last card from the row. Your goal is to pick exactly k cards and maximize the sum of the points of the cards you select.
You are given an array of integers arr. We want to find the number of triplets (i, j, k) where 0 <= i < j <= k < arr.length, such that the bitwise XOR of elements between indices i and j-1 (inclusive) equals the bitwise XOR of elements between indices j and k (inclusive).
You are given an array of integers nums. Your task is to calculate the running sum of the array, where each element at index i represents the sum of all elements from index 0 to index i in the original array.
You are given an array of integers arr. Your task is to count the number of subarrays whose sum is odd. Since the answer can be a large number, return it modulo (10^9 + 7).