Why not Recursive?

Revision en1, by anmolsainiii23, 2023-10-26 21:22:20

Hi I was wondering why can't we use recursive Solution for Coin Piles Solution. This is the Problem

I have tried recursive solution but end up getting TLE and Runtime Error. Can anyone explain whether we can use Recursion or Dynamic Programing. This is my Solution.

This is my Soluion

Tags cses, dynamic programming, recurrence

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English anmolsainiii23 2023-10-26 21:22:20 443 Initial revision (published)