Company: Nxtwave_13dec
Difficulty: medium
Raju and the Binary String Mystery Problem Description An enthusiast of binary strings starts with one such string and repeatedly performs the following move, zero or more times: Append a 0 to one end of the string and a 1 to the other end. For example, starting from the string "1011" , one of these results could be reached: "010111" (appending 0 on the left and 1 on the right), or "110110" (appending 1 on the left and 0 on the right). You are shown the resulting string after some number of these moves. Determine the shortest possible length of the string it could have started from. A binary string is a string whose characters are either 0 or 1 . The original string could have been empty, in which case the shortest possible length is 0 . Input Format The first line contains an integer n — the length of the resulting string. The second line contains a binary string s of length n . Output Format Output a single integer — the shortest possible length of the original string. Examples Examp