GALE Partners interview question

Few questions were based on a string.