Create and array created [ ] to keep track of created nodes , initialize all entries as None
created = [ None for i in range ( n + 1 ) ] NEW_LINE root = [ None ] NEW_LINE for i in range ( n ) : NEW_LINE INDENT createNode ( parent , i , created , root ) NEW_LINE DEDENT return root [ 0 ] NEW_LINE