4 kyu

Sum Strings as Numbers

26,107 of 45,071nicknovitski

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 Trained91358
Total Skips13106
Total Code Submissions722564
Total Times Completed45071
JavaScript Completions26107
C# Completions6950
PHP Completions1828
C++ Completions3418
C Completions968
Java Completions1696
Lua Completions90
Python Completions4775
Total Stars2067
% of votes with a positive feedback rating83% of 4509
Total "Very Satisfied" Votes3330
Total "Somewhat Satisfied" Votes802
Total "Not Satisfied" Votes377
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