Math, asked by neelamdeeo3636, 1 year ago

Find if sum of any 2 elements in an sorteed array equal to k

Answers

Answered by zoya5832
0

Answer:

Given a sorted array of integers and a number k, write a function that returns true if given array can be divided into pairs such that sum of every pair k.

Expected time complexity O(n) and extra space O(1). This problem is a variation of below problem, but has a different interesting solution that requires only O(1) space.

Similar questions