For a long time it puzzled me how something so expensive, so leading edge, could be so useless. And then it occurred to me that a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match. Bill Bryson

Two sum from array

Language Java | Level Intermediate | Category Data structure | September 9, 2015 10:23 am

Data structure Description

Given an array of elements and sum. The program should displays the array elements which combinations equal to sum.

Write a program to give two sums from the array.



List of items form array: [2, 8, 3, 9, 5, 7, 3, 6]
Sum of two items '8' : [3, 5]



No comments available!

Please login to add comments.