Longest sequence of positive integers in an array
Find the longest-running positive sequence in an array. Examples: Input : arr[] = {1, 2, -3, 2, 3, 4, -6, 1, 2, 3, 4, 5, -8, 5, 6} Output :Index : 7, length : 5 Input : arr[] = {-3, -6, -1, -3, -8} Output : No positive sequence detected. A simple solution is to use two nested loops. In the outer loo