Add corresponding elements in two arrays of different length
Format
Given two arrays:
a = [50, 17, 54, 26]
b = [19, 7, 8, 18, 36, 8, 18, 36, 18, 14]
Result:
$ ruby differnet-length.rb
[69, 24, 62, 44, 86, 25, 72, 62, 68, 31]
Languages
- Python
- Ruby