in gold grid size m x n cell integer represent gold cell 0 emptyReturn maximum gold collect conditionsevery time locate cell collect gold cellFrom position walk step leave right downyou can not visit cell oncenever visit cell 0 goldyou start stop collect gold position grid gold Example 1input grid 060587090output 24explanation060 587 090path maximum gold 9 8 7example 2input grid 1072063450309020output 28explanation107 206 345 030 9020path maximum gold 1 2 3 4 5 6 7 Constraintsm gridlengthn gridilength1 m n 150 gridij 100there 25 cell contain gold