Closed kiruba-r11 closed 3 years ago
@ankitapuri Please have a look at it
@ankitapuri The problem works fine and I have tested it. I hope you would have entered the inputs in unsorted order, but the inputs for this question must be in sorted order to use the Two Pointer
concept.
see this
@ankitapuri It's correct, there are pairs with sum 5, that is 1,4 and 2,3. The question is to return true or false about whether a pair is found or not, and not to print the pair found.
Related Issues
Closes: #233
Describe the changes you've made
I have completely implemented a CPP program that takes the input of array elements from the user and prints the true if a
Pair with given sum
exists else prints falseType of change
How Has This Been Tested?
This has been tested by generating a set of random inputs using a generator and verified the outputs manually.
Describe if there is any unusual behavior of your code(Write
NA
if there isn't)NA
Checklist: