Wednesday, February 19, 2014

code wrap

code
1:    string multiply(string num1, string num2) {  
2:      // Start typing your C/C++ solution below  
3:      // DO NOT write int main() function  
4:      if(num1.size() ==0 || num2.size() ==0) return 0;  
5:      string res(num1.size()+num2.size()+1, '0');  
6:      std::reverse(num1.begin(), num1.end());  
7:      std::reverse(num2.begin(), num2.end());  
 
https://gist.github.com/

No comments:

Post a Comment