Question: Complete the function magical_string(), strictly in python3 language only. everything is clearly mentioned in the pic attached. kindly consider the constraints as well as multiple




Magical string You are given the following: S String consisting of only uppercase English alphabets You want to convert string Sinto a Magical string that has either of the following propertiest All the characters in the string consist of either A or B. . There exists index i such that 1 Si
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
