Function to check whether the node needs to be deleted or not
def deleteNode ( nodeVal ) : NEW_LINE INDENT if nodeVal in mp : NEW_LINE INDENT return True NEW_LINE DEDENT else : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT