base condition if kth node value is greater then nth node then its means kth node is not valid so we not store it into the res simply we just return
if kThNode > nThNode : NEW_LINE INDENT return NEW_LINE DEDENT