Sorted sums of a sorted list

code 25 September 2008 | 3 Comments

This is a post in response to this question over at the newly-spawned StackOverflow. Essentially: If we have a sorted list of numbers, how can we efficiently get a sorted list of the sums of every pair of numbers in that list? My initial reply is also there. I decided that, since I have a [...]

Tagged in , ,