mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-24 18:41:52 +08:00
355 B
355 B
id, title, topics, difficulty, source
| id | title | topics | difficulty | source | |
|---|---|---|---|---|---|
| 8 | Pivot Index |
|
easy | https://leetcode.com/problems/find-pivot-index/ |
Question
'''
Given an array of integers, return the pivot index of this array.
A pivot index is the index where the sum of the numbers to its left is equal to the sum of the numbers to its right:
[7, 2, 3, 4] => 1
'''