Company: ibm_10sep
Difficulty: medium
Minimum Special Subsequences Problem Description A monitoring device only accepts alternating bit patterns as valid firmware packets — binary strings in which no two neighboring characters are equal, which we will call "special strings". To transmit a longer binary string, it must first be split into one or more subsequences, each of which is itself a special string, with every such subsequence sent as its own separate packet. Determine the fewest packets needed to transmit a given binary string this way. Note: A subsequence is formed by deleting some characters from the original string while keeping the remaining characters in their original order. Complete the function getMinSubsequences in the editor with the following parameter: string input_str: a binary string Returns: int: the minimum number of subsequences that the string can be broken into Examples Example 1: Input: input_str = "00100" Output: 3 Explanation: This string splits into three special subsequences: "0" (first charac