Iterative V/s Recursive dp

Revision en1, by Sm_ar__z__, 2024-09-16 13:52:11

Hi everyone , I recently submitted my dp soln to the problem 1987D - World is Mine and was really surprised with the running time of both my code , iterative — 281468972 which ran in 400ms to recursive — 281467770 which barely passed the time limit . Please can anyone tell me whether my implementation to the recursive part is wrong and if not , why so much discrepancy. Thank You..!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Sm_ar__z__ 2024-09-16 13:52:11 442 Initial revision (published)