Where can i find such problems whose solutions have an exponential time complexity like O(2^n)
I know problems having constraints like n<25 will be solved with solution having exponential time complexity like O(2^n).
But how can i find those problems.Is there any special tag for them?I am not able to find them.
If Anyone can help , Thanks in Advance!
I searched for Bruteforce Tags but all maximum problems have constraints like 1000 or 100 but i wanted n<25.
Brother the link you sent have constraints 10^5, I am sure solution will not be having 2^n complexity right?
Can you send any other link.
Thanks Brother, Actually i came across a problem which i know that it will be solved by considering all possibilities but i am not able to think how to implement that so i thought i should practice some problems having 2^n solution.
Have you came across a problem which includes matrix and we have to consider all possibilities(2^n),(btw that Atcoder problem is also a matrix one but if there are similar problems) if yes please send link to that problem.
If no, I will search it to practice
The editorial for this problem uses bitmak dp which is O(2^n), however, I solved it in polynomial time.
Bitmask Dp is an interesting topic. The runtime of a bitmask dp algorithm is generally O(2^n). The gfg link might be confusing at first, I’d suggest you see this or/and read this if you want to learn bitmask dp.