▁ ▁History ▁ ▁The ▁maximum ▁sub array ▁problem ▁was ▁proposed ▁by ▁Ul f ▁Gren ander ▁in ▁ 1 9 7 7 ▁as ▁a ▁simplified ▁model ▁for ▁maximum ▁lik elihood ▁estimation ▁of ▁patterns ▁in ▁digit ized ▁images . ▁ ▁Gren ander ▁was ▁looking ▁to ▁find ▁a ▁rect angular ▁sub array ▁with ▁maximum ▁sum , ▁in ▁a ▁two - dimensional ▁array ▁of ▁real ▁numbers . ▁ ▁A ▁br ute - force ▁algorithm ▁for ▁the ▁two - dimensional ▁problem ▁runs ▁in ▁O ( n 6 ) ▁time ; ▁because ▁this ▁was ▁prohib it ively ▁slow , ▁Gren ander ▁proposed ▁the ▁one - dimensional ▁problem ▁to ▁gain ▁insight ▁into ▁its ▁structure . ▁ ▁Gren ander ▁derived ▁an ▁algorithm ▁that ▁solves ▁the ▁one - dimensional ▁problem ▁in ▁O ( n 2 ) ▁time , ▁impro ving ▁the ▁br ute ▁force ▁running ▁time ▁of ▁O ( n 3 ). ▁When ▁Michael ▁Sh amos ▁heard ▁about ▁the ▁problem , ▁he ▁over night ▁de vised ▁an ▁O ( n ▁log ▁n ) ▁divide - and - con quer ▁algorithm ▁for ▁it . ▁So on ▁after , ▁Sh amos ▁described ▁the ▁one - dimensional ▁problem ▁and ▁its ▁history ▁at ▁a ▁Car neg ie ▁M ell on ▁University ▁sem inar ▁attended ▁by ▁Jay ▁K ad ane , ▁who ▁designed ▁within ▁a ▁minute ▁an ▁O ( n )- time ▁algorithm , ▁which ▁is ▁clearly ▁as ▁fast ▁as ▁possible . ▁In ▁ 1 9 8 2 , ▁David ▁G ries ▁obtained ▁the ▁same ▁O ( n )- time ▁algorithm ▁by ▁applying ▁D ijk stra '