Algorithm program 6, 2-SUM