Smallest length string with repeated replacement of two distinct adjacent
Given a string of any combination of three letters 'a', 'b', and 'c', find length of the smallest string that can be obtained by applying the following operation repeatedly: Take any two adjacent, distinct characters and replace them with the third. Examples: Input : cabOutput : 2We can select any t