How To Check If A String Is Symmetrical With Programming
Problem Statement You’re given a string. You need to determine whether the given string is symmetrical or not. Example 1: Let str = “abab”. The given is symmetrical as both halves of the string are the same. Thus, the output is “Yes, the given string is symmetrical”. Example 2: Let str = “madam”. If the length of the string is odd, the middle character of the string is ignored. Therefore, 1st half = “ma” and 2nd half = “am”....