BlackRockSoftware EngineerSoftware EngineerQuestion #48

Write a function that takes a string and an integer as inputs. The integer specifies the maximum number of consecutive repeated letters to allow in the returned string. For example: ('aab', 1) -> 'ab'; ('aaabba', 2) -> 'aabba'.

Unlock the Full Solution

Enter your email to get the detailed step-by-step solution to this BlackRock interview question, plus access to free interview prep resources.

We'll also send you a free HFT mock interview video.

Get All 104+ BlackRock Questions with Solutions

Plus 16+ hours of video lectures, resume tailoring, and 1:1 mentorship from quants.

Schedule a Call