the code works well for custom test case vut 1 test case is wrong upon final submission
1 test case going wrong
hello @tanjuljain19,
a) value of n can be upto 1000 000 000 ,and we cannot declare that big size array inside ur program because it requires too much memory.
use top down dp and map to rectify ur issue.
u have declared m as a global variable so no need to pass insider function
resolved thanks a lot