Apple Interview Question

Two Sum using different method