#include #include using namespace std; void largestIncreasingPositiveDotProductSeq(vector velocityDirs, int &startIndex, int &endIndex) { int positiveVelSeqSize = 0; int flag = false; int maxSeqSize = 0; int st = 0; for (int j=0; j 0 && flag == false) { st = j; positiveVelSeqSize++; flag = true; cout << "In first if positiveSize "< 0 && flag == true) { positiveVelSeqSize++; cout << "In second if positive "< maxSeqSize) { maxSeqSize = positiveVelSeqSize; startIndex = st; endIndex = st+positiveVelSeqSize; cout << "maxseq updated \npositiveSize "< test(4); test[0]=0; test[1]=7; test[2]=0; test[3]=7; /*test[4]=5; test[5]=2; test[6]=-3; test[7]=-4; test[8]=2; test[9]=3; */ int st; int endIndex; largestIncreasingPositiveDotProductSeq(test,st, endIndex ); for (int i=st; i<=endIndex; i++) { cout << test[i]<=st; i=i-5) { c = i; cout << c << endl; size++; } if ((c-st) != 0) { cout <<"additional " <