Please Look into it
Bro share question link
1 Like
Your time comp is O(t * d). So, it gave TLE. Try to optimize it.
3 Likes
@codie_1
Try to solve it in o(logD) - excluding the complexity due to test case loop.
Try to identify the pattern b/w no. of likes on first day, second day, third day,and…so on.
Identify the series…
(Well i gave you a hint)
Yes Please
@codie_1
I already gave you the hint.
Hint - Identify the series.
Its a formula based question and can be solved in O(logD).