Bloomberg Interview Question

Design of a regular expression parser to match the repeating characters and algorithm based on binary search.