XYZ Interview Question

string array dsa sql solving