dp[5] should return 3 they have returned 4
Wrong output is coming for n=5
please send your code through ide link i will check
how to send ide link
copy your code here(link below) and click save in file and then copy the link and paste it here
@simi_1188 corrected the code it should be i% no n%
hope its clear if yes dont forget to mark it resolved and hit like 
1 Like
