4 kyu

Sum Strings as Numbers

26,180 of 45,282nicknovitski

Description:

Given the string representations of two integers, return the string representation of the sum of those integers.

For example:

sumStrings('1','2') // => '3'
strsum("1", "2")    /* => 3 */

A string representation of an integer will contain no characters besides the ten numerals "0" to "9".

I have removed the use of BigInteger and BigDecimal in java

Python: your solution need to work with huge numbers (about a milion digits), converting to int will not work.

Strings
Big Integers
Algorithms

Stats:

CreatedMar 15, 2014
PublishedMar 15, 2014
Warriors Trained91825
Total Skips13160
Total Code Submissions725309
Total Times Completed45282
JavaScript Completions26180
C# Completions6961
PHP Completions1831
C++ Completions3434
C Completions974
Java Completions1723
Lua Completions92
Python Completions4861
Total Stars2074
% of votes with a positive feedback rating83% of 4516
Total "Very Satisfied" Votes3334
Total "Somewhat Satisfied" Votes803
Total "Not Satisfied" Votes379
Ad
Contributors
  • nicknovitski Avatar
  • jhoffner Avatar
  • xcthulhu Avatar
  • ahamidou Avatar
  • donaldsebleung Avatar
  • Chrono79 Avatar
  • Voile Avatar
  • rowcased Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • uniapi Avatar
  • user8436785 Avatar
  • Sigmanificient Avatar
  • fcr-- Avatar
  • tomatosonic Avatar
Ad