LTIMindtree interview question

basic DSA questions from array and string