4 kyu

Sum Strings as Numbers

26,471 of 46,189nicknovitski

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 Trained93534
Total Skips13387
Total Code Submissions735205
Total Times Completed46189
JavaScript Completions26471
C# Completions7040
PHP Completions1850
C++ Completions3505
C Completions996
Java Completions1819
Lua Completions100
Python Completions5218
Total Stars2097
% of votes with a positive feedback rating83% of 4565
Total "Very Satisfied" Votes3367
Total "Somewhat Satisfied" Votes812
Total "Not Satisfied" Votes386
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