Python Maximum Subarray Problem in Plain English

preview_player
Показать описание

Looking at the classic max continuous subarray problem in plain english. Includes detailed thought process along with trial and error using a greedy approach. Also highlights issues with the solution when the array size gets large, or at least goes up by factors of 10, up to 10,000.

It took around 48 seconds to run with the 10,000 element numpy array btw.

I don't handle the case of all negatives and other edge cases.
Рекомендации по теме
Комментарии
Автор

I really like your way of explaining things while coding it. Keep doing the good work. Can you do this with a 2D matrix.

ArunkumarYadavq