Pergunta de entrevista da empresa Workhub Software

Given sorted int[] and int N, find if the array has two elements sum to N. Optimize the solution if possible.