307. Range Sum Query - Mutable - Day 31/31 Leetcode July Challenge

preview_player
Показать описание
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits!

#leetcode #coding #programming
Рекомендации по теме
Комментарии
Автор

Hi Larry, I tried very basic approch in this question that I am initialing array, sum of whole array and then in update making change in array on that index and also changing sum according to new value and in getSum, just minus sum of array (0, left) + array (right+1, Len array) and it was 98 % faster in python submission and memory was around 80% better, can you explain why??

UmeshMalik
visit shbcf.ru