I didnt understand exactly how the dp approach is
O(2^N *N)…can someone explain?there are total 2^N masks possible and we are having N cities but wasnt this the same case as before…?I am a bit confused plz help
Travelling Salesman Problem
No before we either include and exclude pure recursion so for every option two options so time complexity 2 pow mein pura.
But using dp it reduced to 2 pow n * n
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.