How to solve UVA 861 Little Bishops

Revision en1, by abhatter, 2020-12-05 07:26:14

Hello,

I am learning to apply memoization technique but not able to figure it out. My brute force recursive back tracking solution gives correct answer but then times out quickly. I tried to search answer to this question but then I am not able to understand anything. could you please help me in this regards? I have attached my solution

Problem link below https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=802

Thanks in advance

Tags #memoization, #backtracking, #recursion

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en7 English abhatter 2020-12-31 00:20:18 29 Tiny change: 'regards?\nI have attached my solution\n\n\n[Pro' -> 'regards?\n\n\n[Pro'
en6 English abhatter 2020-12-31 00:19:53 1585
en5 English abhatter 2020-12-05 07:30:45 2 Tiny change: 'as below\n~~~~~\n#' -> 'as below\n\n~~~~~\n#'
en4 English abhatter 2020-12-05 07:30:11 20 Tiny change: 'dvance\n\n\n~~~~~\n#' -> 'dvance\n\nMy solution as below\n~~~~~\n#'
en3 English abhatter 2020-12-05 07:29:46 29
en2 English abhatter 2020-12-05 07:27:22 1537
en1 English abhatter 2020-12-05 07:26:14 535 Initial revision (published)