senshi2504's blog

By senshi2504, history, 4 years ago, In English

https://www.hackerearth.com/practice/algorithms/graphs/shortest-path-algorithms/practice-problems/algorithm/mancunian-goes-to-the-derby/description/ I am facing it tough to understand the editorial of this problem . I know it'll sound really simple for most of you . So can someone please explain the editorial to me , or tell me their own way of going about this problem. Any help is appreciated :)

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By senshi2504, history, 4 years ago, In English

http://acm.timus.ru/problem.aspx?space=1&num=1017

I have been trying this problem for a while . I have figured out the state to be dp[taken][remaining] where taken tells me the number of blocks i have used till now , and remaining tells me the number of blocks that are left with me . Now base case is trivial , but I am not able to get the transition . Can someone please help me with this . Any help is appreciated :)

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By senshi2504, history, 4 years ago, In English

http://codeforces.com/contest/767/problem/C

I have done some very basic questions of DFS , but I always feel confused and not so sure about , how to systematically formulate my solution in the dfs code . I feel confused , wheather to place certain statements before or after the recurssive call. A similar situation happens for this problem too . I came up with the idea , but feel lost when I have to code it in the dfs solution. I would request this community , to please share your approaches towards handling such DFS codes . Thanks :)

Read more »

 
 
 
 
  • Vote: I like it
  • +5
  • Vote: I do not like it