Check if the number is present in the hashmap Or in other words been popped out from the stack before .
if num in mp : NEW_LINE INDENT print ( "0" , end = " ▁ " ) NEW_LINE DEDENT else : NEW_LINE INDENT cnt = 0 NEW_LINE DEDENT