jig_nayi
December 13th, 2006, 04:28 PM
Pls help me with this algorithm
We have an array of integers which is sorted. We are given a integer m.
Define an algorithm that determines wether there exist two integers X < Y in the array, such that X + y = m
This must run in linear time - O (n)
Thanks
We have an array of integers which is sorted. We are given a integer m.
Define an algorithm that determines wether there exist two integers X < Y in the array, such that X + y = m
This must run in linear time - O (n)
Thanks