Given integer X, determine if 2 elements of array have X as sum

Prototype check in. 2 ways to solve the problem (read comments)