Problem
Suppose you are given an integer array A of length n and some integer z. Write an algorithm that searches the array for two integers x and y such that x + y = z. The algorithm should return the pair (x, y) if it finds that and some reserved token "NONE" if two such integers do not exist. Your algorithm must run in O(n) time and O(n) space.