I think O(n) is the best time complexity. Try to think about one sequence
with all negative numbers or positive numbers. we can't get the full
information without one time iteration, or we can just say the data reading
time will cost O(n).
2011/4/21 hary rathor
> Problem; print the largest subse
Problem; print the largest subset of negative number in array of integers
i have code it in following way which is give solution in O(n) and and
required memory in O(n)
any tell me other method better then this O(n) .
pls tell me is it any bug in the code
#include
int count=0,ind=-1,len,i=0;
v