Search
⌘K

Leetcode 724. Find Pivot Index

Find the leftmost index in an integer array where the sum of elements strictly to its left equals the sum strictly to its right, or return -1 if none exists. This is a prefix/suffix-sum problem (solvable in O(n) time by comparing a running left sum to the total).

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid December, 2024

Google

Google

Mid-level

Find pivot elements in an array containing duplicates using binary search

Mid December, 2024

Google

Google

Mid-level

Find pivot elements in an array containing duplicates using binary search

Comments

Your account is free and you can post anonymously if you choose.