LTM Limited Interview Question

basic DSA questions from array and string