You are given a string s. You need to determine the number of valid ways to split s into two non-empty substrings such that the number of distinct letters in the left and right substrings is the same.
You are given a binary string target and another string s initialized to all zeros. In one operation, you can flip all bits in the inclusive range starting from index i to n-1. The task is to determine the minimum number of operations needed to make s equal to target.
You are given two strings s and t and a number k. Your task is to convert string s into string t using no more than k moves. In each move, you can choose an index j (1-based) from string s and shift the character at that index by i positions, where i is the current move number.
You are given a string s containing only the characters '(' and ')'. A string is considered balanced if each '(' has a matching pair of consecutive '))' and if they appear in the correct order. Your task is to return the minimum number of insertions needed to make the string balanced.
Given a binary string, you need to split it into three non-empty parts such that each part contains the same number of ‘1’s. You must return the total number of ways to split the string, with the result modulo 10^9 + 7.