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

Автор Hazemzz, история, 7 лет назад, По-английски

i always have a problem with all greedy problem that is not easy to see its optimal choice ?

some times i get an intuition but i am not sure it works 100% how would i improve my proving skills for greedy .would i try my intuition with code and check if it will get a WA or not ? some tips from you please .

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

»
7 лет назад, # |
Rev. 3   Проголосовать: нравится +26 Проголосовать: не нравится

Code your greedy, code a naive working code, test if for a lot of random (small) inputs. Check if your greedy code is working fine. It reduces the chance of getting WA.