class Solution { public: // Function to find equilibrium point in the array. int findEquilibrium(vector &arr) { // code here int n = arr.size(); int sum=0; int sum1=0; int ans = -1; for(int i:arr){ sum += i;//total sum } //part1+part2=sum for(int i=0;i
class Solution {
public:
// Function to find equilibrium point in the array.
int findEquilibrium(vector &arr) {
// code here
int n = arr.size();
int sum=0;
int sum1=0;
int ans = -1;
for(int i:arr){
sum += i;//total sum
}
//part1+part2=sum
for(int i=0;i