If current node data is greater for max then replace it
if ( current . data > maxEle ) : NEW_LINE INDENT maxEle = current . data ; NEW_LINE DEDENT current = current . next ; NEW_LINE if ( current == head_ref ) : NEW_LINE INDENT break NEW_LINE DEDENT return maxEle ; NEW_LINE