title: Program Find Smallest Difference Angles Two Parts Given Circle
signature: func programFindSmallestDifferenceAnglesTwoPartsGivenCircle(arr []int, n int) int {
source_py: def program_find_smallest_difference_angles_two_parts_given_circle(arr, n):
      l = 0
      _sum = 0
      ans = 360
      for i in range(n):
          _sum += arr[i]
          while (_sum >= 180):
              ans = min(ans, (2 * abs((180 - _sum))))
              _sum -= arr[l]
              l += 1
          ans = min(ans, (2 * abs((180 - _sum))))
      return ans
source_cpp: int program_find_smallest_difference_angles_two_parts_given_circle(vector<int> arr, int n) {
    int l = 0, sum = 0, ans = 360;
    for ( int i = 0;
    i < n;
    i ++ ) {
      sum += arr [ i ];
      while ( sum >= 180 ) {
        ans = min ( ans, 2 * abs ( 180 - sum ) );
        sum -= arr [ l ];
        l ++;
      }
      ans = min ( ans, 2 * abs ( 180 - sum ) );
    }
    return ans;
  }