Domanda di colloquio di Barclays

Medium-Hard DSA question on string manipulation and pattern detections