Get started with 60 Hours of Free course right now 

Find a pair

Kopal Jaiswal
16 Posts

WAP to find a pair in a sorted array such that the sum of pair is equal to the given number.

 

Example:

Input:

A= {2,6,10,13,15,19,20,30,40}

N=29

Output={10,19}

10+19=29

Published By : Kopal Jaiswal
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Comments