ABC interview question

Related to string operation Related to matrix Related to array And pattern