3 ms·
Are you using 32/64 bit integers or arbitrary length inputs? It's NP-Complete because all of the known solutions are exponential to the number of bits of the in
by trinovantes 5y ago
Are you using 32/64 bit integers or arbitrary length inputs? It's NP-Complete because all of the known solutions are exponential to the number of bits of the input.
- zzxxyyaabbcc 5y agoThe standard 4 byte int, on a 64x build
- trinovantes 5y agoThen you did not solve the problem in polynomial time. Your runtime is probably (2^n)^C where n is the number of bits in the input and C is some constant.