Skip to content

isabasan/EquilibriumIndex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

First Equilibrium Index

A zero-indexed array A consisting of N integers is given. An equilibrium index of this array is any integer P such that 0 <= P < N and the sum of elements of lower indices is equal to the sum of elements of higher indices

Write a function that, given a zero-indexed array A consisting of N integers, returns first of its equilibrium indices. The function should return -1 if no equilibrium index exists.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages