Sum the Imported Amounts
Intermediate SolvedA CSV import delivers amounts as text. Before they can be totalled they must be parsed to numbers. Return the numeric sum of a list of numeric strings.
Implement `solve(List<String> values)` where each is a numeric string, returning their numeric sum.
Examples
Input
["10", "20", "5", "15"]Output
50Input
["100"]Output
100Hints
- Integer.valueOf(s) parses a numeric string.
Tests
Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.