Maximum moves to reach destination character in a cyclic String
Given a cyclic string S of length N consisting of only three characters 'a', 'b', and 'c'. Also given two characters, initial character (ic) and final character (fc). the task is to find the maximum distance from ic to its closest fc. Examples: Input: s = "caacb", ic = 'c', fc = 'a'Output: 3Explanat