What is bitmasking and how is it useful in solving combinatorial problems?
Bitmasking is a technique to solve problems that involve manipulating numbers in binary form, often used for graph traversal algorithms like BFS or DFS.
Thatâ€™s partially correct. While bitmasking is used in combinatorial problems, itâ€™s not typically associated with graph traversal algorithms directly.
Can you explain how bitmasking is more directly applied in problems like subset sum or TSP?