C ++ code to find non - negative sub - array whose sum shows minimum deviation . This works only if all elements in array are non - negative
#include <bits/stdc++.h> NEW_LINE using namespace std ; struct Pair { int f , s , t ; Pair ( int f , int s , int t ) { this -> f = f ; this -> s = s ; this -> t = t ; } } ;