Even after applying dp tle is coming pls help
TLE error after applying dp
hello @kunal81198
a) dont use array as we cannot declare array of 10^9(value of n can be upto 10^9)
use map.
b) use top down in place of bottom up because top compute only required states whereas in bottom up compute all states from 1 to n
1 Like