Freshworks Interview Question

string merging in random arrangements