Murex interview question

Three leetcodes, two is the string and another is array