Piyush and Magical Park

is sample case wrong? for sample case we encounter 7 dots and 3 stars in total and that gives final strength as 11 instead of 13

no, sample test case is correct.
i think u haven’t handled the last column condition
if u r in the last colmn the we dont need spend 1 unit in traversing

hope this will help u
pls rate my work
pls