mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-11 14:36:25 +08:00
Update divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -69,8 +69,9 @@ std::string addStrings(std::string first, std::string second) {
|
||||
(firstBit & carry); // sum of 3 bits
|
||||
}
|
||||
|
||||
if (carry)
|
||||
if (carry) {
|
||||
result = '1' + result; // adding 1 incase of overflow
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user