Company: Amazon_24oct
Difficulty: medium
Minimum Modifications for Stable Network Node Problem Description Amazon engineers are performing a stability assessment on a network node, and the node's status is represented by a binary string. The network node is considered stable if the string does not contain '010' or '101' as subsequences. Note that, in general, subsequences are not same as substrings. Your goal is to calculate the minimum number of modifications required to make the binary string stable. A modification at a specific position in the sequence is defined as flipping the character at that position. For instance, flipping a '0' changes it to '1', and vice versa. Note: A subsequence is a sequence derived from the original string by deleting zero or more elements without changing the order of the remaining characters. For example, subsequences of "101101" include "0", "1", "11", "011", and "101", but not "000", "101010", or "1100". Complete the function calculateMinimumModifications in the editor below. calculateMinim