Problems > Binary to Decimal > Editorial

Binary to Decimal — Solution & Editorial

Back to the Problem

Fold left: value = value×2 + bit. The result fits in 64 bits.

Complexity: O(|S|)