Doubt in shifting elements.From line 7 to 15 of code ,is there any better way or easy way to do this part
hello @Ashu1318
check this->

- Traverse the string. At each instance check whether substring starting from index 0 till index 2 is same as βpiβ.
- If so , obtain the result for remaining string from index 2 i.e. s.substring(2) recursively . Store this result in say βrosβ . Now return β3.14β + ros.
- If however , it was not so , obtain the result for the remaining string starting from index 1 and add s[0] to it i.e. return s[0] + ros.