Time complexity of an iterative algorithm
问题 I am trying to find the Time Complexity of this algorithm. The iterative: algorithm produces all the bit-strings within a given Hamming distance, from the input bit-string. It generates all increasing sequences 0 <= a[0] < ... < a[dist-1] < strlen(num) , and reverts bits at corresponding indices. The vector a is supposed to keep indices for which bits have to be inverted. So if a contains the current index i , we print 1 instead of 0 and vice versa. Otherwise we print the bit as is (see else