Minimize the String length by removing given consecutive pairs
Given a string S of size N consisting of characters from '0'to '9', the task is to minimize the length of the string where In each minimizing operation, we can remove any two consecutive characters if they are of the form {"12", "21", "34", "43", "56", "65", "78", "87", "09", "90"}. Examples: Input: