give 0indexed string word character ch reverse segment word start index 0 end index occurrence ch inclusive if character ch exist word nothingFor example word abcdefd ch d reverse segment start 0 end 3 inclusive the result string dcbaefdreturn result string example 1input word abcdefd ch doutput dcbaefdexplanation the occurrence d index 3 Reverse word 0 3 inclusive result string dcbaefdExample 2input word xyxzxe ch zOutput zxyxxeexplanation the occurrence z index 3reverse word 0 3 inclusive result stre zxyxxeexample 3input word abcd ch zOutput abcdExplanation z exist wordYou reverse operation result string abcd Constraints1 wordlength 250word consist lowercase english lettersch lowercase english letter