Bade hi experienced ho aap toh 
2 Likes
Bs apse kuch 5-10%. Dot dot dot
1 Like
might be because of integer overflow, try having long dp[][]
1 Like
Where can we find material to read about Garsia Wachs algortihms?
What does โLinear Caseโ mean??
it means just a normal array, i.e. not taking the first and last elements to be adjacent here.
That was really a great problem . Learned many things .
Try making an algorithm to find division and modulus using bitwise operations.
You will realize why.
Solve similar problems like mixture(spoj),matrix chain multiplication