I was asked this problem in an OA. I am given an n digit number (n <= 1e7), and a number k (<= n)
I was asked to build the largest possible number using some of these digits (maybe all), such that the largest continuous same digit length is <= k.
Thought a lot but could'nt solve. Now I am curious because the solution isnt available online.
pls help i beg.