Блог пользователя mkmeden

Автор mkmeden, история, 22 месяца назад, По-английски

https://www.hackerrank.com/challenges/bear-and-steady-gene/problem

Can someone please explain why my code is not passing some test cases.

Code
  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
22 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Consider the case:

n = 12 gene = AAAACCCCGGGG

Your Code returns 3. But you need to replace at least one A, one C and one G. And the minimum substring that contains those three letters has length 6.