Random commentary about Machine Learning, BigData, Spark, Deep Learning, C++, STL, Boost, Perl, Python, Algorithms, Problem Solving and Web Search
global_max=0; this_max=0; for (i=1 to n-1) if (x[i]>=x[i-1]) { this_max++; global_max=max(this_max, global_max);} else this_max=0;
global_max=0; this_max=0; for (i=1 to n-1) if (x[i]>=x[i-1]) { this_max++; global_max=max(this_max, global_max);} else this_max=0;
ReplyDelete