You are given a binary tree with three nodes: the root, its left child, and its right child. Determine whether the value of the root node is equal to the sum of the values of its two children.
You are given a string of digits, s, and an integer k. Your task is to repeatedly process the string until its length becomes less than or equal to k. In each step, divide the string into consecutive groups of size k. If the last group is smaller than k, process it as is. For each group, calculate the sum of its digits, convert the result back to a string, and merge all groups to form a new string. Repeat the process until the string length is ≤ k, and return the final string.
Given a list of strings words and a target string s, count how many strings in words are prefixes of s. A prefix is defined as a substring starting from the beginning of a string and extending up to a given length. Note that duplicate strings in words should be counted separately.
You are given a string number representing a positive integer and a character digit. Your task is to remove exactly one occurrence of digit from the string number such that the resulting number, when interpreted as an integer, is maximized. The test cases are guaranteed to have at least one occurrence of digit in the string.