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

Автор oartihsin, история, 4 года назад, По-английски

black has to travel n-x distance row-wise and n-y distance column wise to reach the coin at (x,y). Hence total distance travelled by black is b = n-x + n-y. Similary white has to travel x-1 distance row wise and y-1 column wise. Total distance travelled by white is w = x-1 + y-1. if(b<w) answer is black. else answer is white(if(w<b) it is obvious ... but if b==w then white reaches first as white starts the game and is always a move ahead of black) -

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

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

Автор oartihsin, история, 4 года назад, По-английски

I have been solving problems for quite a while. Even I acknowledge that I am not a quick learner but I try my best. Recently I got some resources to improve my skills. But even in those resources I get stuck at problems which involve** Dynamic Programming** and Advanced Recursion. I also surfed through the web but none of them are simple enough to cover the entire concept. Can someone help me out by providing some advises or maybe some learning resource? It would be a great help.

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

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