Retired

Split-form Addition (retired)

35 of 154wengzilla

Description:

Let "split-form" represent a positive integer that is split into its respective digits. For instance, the split-form of 123 is: [1, 2, 3]

Write a class Addition that can be initialized with two split-form operands and has a sum method that returns the sum of the two operands, also in split-form.

Example

Addition.new([1, 2, 3], [2, 3]).sum  -->  [1, 4, 6]
Addition([1, 2, 3], [2, 3]).sum()  -->  [1, 4, 6]

The join function cannot be used; rather, you should aim to make an adder that can perform long streams of addition.

Arrays
Fundamentals

More By Author:

Check out these other kata created by wengzilla

Stats:

CreatedOct 20, 2015
Warriors Trained475
Total Skips108
Total Code Submissions392
Total Times Completed154
Ruby Completions35
Python Completions121
Total Stars9
% of votes with a positive feedback rating75% of 70
Total "Very Satisfied" Votes47
Total "Somewhat Satisfied" Votes11
Total "Not Satisfied" Votes12
Total Rank Assessments75
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • wengzilla Avatar
  • jhoffner Avatar
  • ZozoFouchtra Avatar
  • GiacomoSorbi Avatar
  • anter69 Avatar
Ad