Tracxn interview question

DSA question string based