Bit Manipulation - Generate All Permutations Using Bitmask DP
Given the following partial dp table state for n=3 permutations (bitmask keys shown with their stored permutations):
{
0: [[]],
1: [[0]],
3: [[0,1],[1,0]],
7: [[0,1,2],[0,2,1],[1,0,2],[1,2,0],[2,0,1],[2,1,0]]
}
Which element was added last to reach dp[3] from dp[1]?
