dp array with -1 and set dp[1<<i][i] to the length of the i-th word for all i.0 to (1<<n)-1, where n is the number of words.i that are in the current combination (i.e., mask & (1<<i) != 0).i, iterate over all words j that are not in the current combination (i.e., mask & (1<<j) == 0).j-th bit of the current mask.dp[new_mask][j] with the maximum overlap by considering the overlap between words i and j.dp array, backtrack from dp[(1<<n)-1][i] to find the sequence of words that leads to the minimum superstring length.