I felt like doing an algorithm and found this problem on leetcode
Given an array of integers, find two numbers such that they add up to a specific target num
Here is an O(n):
public int[] findSumMatched(int[] numbers, int target) { Map mapOfNumbers = new HashMap(); for (int i = 0; i