Company: HSBC_5sep
Difficulty: medium
Biggest Two-Digit Consistent Fragment Problem Description You are given a string consisting of digits. Find the biggest two-digit value that is a consistent fragment of the given string. For example, two-digit consistent fragments of "50552" are ["50", "05", "55", "52"], representing the numbers [50, 5, 55, 52]. The biggest value among them is 55. Write a function: int solution(string &S); that, given a string S consisting of digits, returns the maximum two-digit value that is a consistent fragment of S. Examples Example 1: Input: S = "50552" Output: 55 Explanation: The two-digit consistent fragments are "50", "05", "55", "52", representing numbers 50, 5, 55, 52. The maximum value among them is 55. Example 2: Input: S = "10101" Output: 10 Explanation: The two-digit consistent fragments are "10", "01", "10", "01", representing numbers 10, 1, 10, 1. The maximum value among them is 10. Example 3: Input: S = "88" Output: 88 Explanation: The only two-digit consistent fragment is "88", repre