Microsoft interview question

Code of to find a particular sum from a given array.