Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Master Data Structures & Algorithms For FREE at AlgoMap.io!
Thank you so much for a clear explanation!
great video! Helped me out a lot.
thanks man that was helpful!
you shouldn't use '/' each step, i'd better return only final res as 'max_sum / k'
Why would it be bad to use "/" on each step?
@@hyperboliq It's not "bad", by dividing only when returning the response, you speed up a bit the solution. Performing x (number of iterations) divisions costs more then performing just one
@@lorenzospizzuoco6434 I see
You don't have to calculate average at each step, instead compare sums, and only at the end return the average.
I did this question but leet code says 121 testcase paassed out of 127
For me it fails on test 116/127. On array [0, 1, 1, 3, 3] with k = 4, i return 2, but site for some unknown to me reason wants 1.25.
Master Data Structures & Algorithms For FREE at AlgoMap.io!
Thank you so much for a clear explanation!
great video! Helped me out a lot.
thanks man that was helpful!
you shouldn't use '/' each step, i'd better return only final res as 'max_sum / k'
Why would it be bad to use "/" on each step?
@@hyperboliq It's not "bad", by dividing only when returning the response, you speed up a bit the solution. Performing x (number of iterations) divisions costs more then performing just one
@@lorenzospizzuoco6434 I see
You don't have to calculate average at each step, instead compare sums, and only at the end return the average.
I did this question but leet code says 121 testcase paassed out of 127
For me it fails on test 116/127. On array [0, 1, 1, 3, 3] with k = 4, i return 2, but site for some unknown to me reason wants 1.25.