Two Pointer Algorithm Javascript Interview Coding Problems C