#Leetcode #724 Find Pivot index #Golang Programming
Here is the solution to "Find Pivot index " leetcode question. Hope that you will like the way I have explained the solution.
Given an array of integers nums, calculate the pivot index of this array.
The pivot index is the index where the sum of all the numbers strictly to the left of the index is equal to the sum of all the numbers strictly to the index's right.
If the index is on the left edge of the array, then the left sum is 0 because there are no elements to the left. This also applies to the right edge of the array.
Return the leftmost pivot index. If no such index exists, return -1.
Link to my github repository to get the code
https://github.com/architagr/leetcode_solutions
Link to the Prefix sum or the running sum of 1d array question: https://www.youtube.com/watch?v=sS4LvbQtKDI
******** Table of content ********
00:00 Understanding the problem statement
02:54 understanding problem with an example
08:34 Brute force approach
12:29 Time complexity of brute force approach
14:54 Understand how to optimize brute force approach
20:18 Dry run of optimized approach
28:16 Algo
31:51 find time and space complexity of the algo
33:07 Final code in Golang
38:00 Thank you
Facebook Coding Interview question,
google coding interview question,
leetcode,
find pivot index
find pivot index Golang
#leetcode #leetcodesolution #Amazon #Facebook #CodingInterview #LeetCode #Google #724 #golang #go #amzon #facebook #google #findpivotindex
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «#Leetcode #724 Find Pivot index #Golang Programming», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.