Question DSA-DP-0075
HardHow does the bitmask DP for the travelling salesman problem run?
- A.
O(n² 2ⁿ), over states (set of visited cities, current city)
- B.
O(2ⁿ) without n
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Dynamic Programming question
How does the bitmask DP for the travelling salesman problem run?
O(n² 2ⁿ), over states (set of visited cities, current city)
O(2ⁿ) without n
Sign up free to see the answer and a step-by-step explanation.
O(n!)
O(n³)