mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-08 15:14:01 +08:00
Update karatsuba_algorithm_for_fast_multiplication.cpp
This commit is contained in:
@@ -59,7 +59,7 @@ std::string addStrings( std::string first, std::string second )
|
||||
int64_t secondBit = second.at(i) - '0';
|
||||
|
||||
int64_t sum = (firstBit ^ secondBit ^ carry)+'0'; // sum of 3 bits
|
||||
sum = to_string(sum);
|
||||
sum = std::to_string(sum);
|
||||
sum += result;
|
||||
result = sum;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user