4 kyu

Sum Strings as Numbers

26,398 of 45,945nicknovitski

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 Trained93070
Total Skips13329
Total Code Submissions732833
Total Times Completed45945
JavaScript Completions26398
C# Completions7013
PHP Completions1845
C++ Completions3491
C Completions994
Java Completions1805
Lua Completions99
Python Completions5103
Total Stars2090
% of votes with a positive feedback rating83% of 4553
Total "Very Satisfied" Votes3360
Total "Somewhat Satisfied" Votes810
Total "Not Satisfied" Votes383
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