Largest number from given digits and max continuous frequency k.

Правка en1, от Aspergillus, 2025-02-13 16:02:16

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.

Теги digits

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Aspergillus 2025-02-13 16:02:16 434 Initial revision (published)