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

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

I am trying to solve this problem https://www.hackerrank.com/challenges/coin-change/problem I am getting WA on 8 testcases , but am not able to point out my mistake . My dp state seems fine to me. Can someone please help me find my mistake in this code . Thanks in advance :) Link to my code https://ideone.com/WpjdKJ

Полный текст и комментарии »

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

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

I read the main idea behind binary search and how it is implemented , but am never able to apply it using certain modifications . I tried solving http://www.spoj.com/problems/AGGRCOW/ , but have not been able to. Can someone please cite some useful resources , from where I can get an idea about how to modify binary search algorithm as and when the need arises. Or maybe , if someone can give an idea , as to how they think while applying binary seacrh.

Полный текст и комментарии »

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