#NEWLINE# def next( self ) : #NEWLINE# #INDENT# '\n        In-order traversal: 1 stack\n        reference:\n        https://github.com/zhangdanyangg/LeetCode/blob/master/095%20Binary%20Tree%20Inorder%20Traversal.py\n\n        :return: next node\n        ' #NEWLINE# if ( not self . hasNext ( ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# while self . cur : #NEWLINE# #INDENT# self . stk . append ( self . cur ) #NEWLINE# self . cur = self . cur . left #NEWLINE# #UNINDENT# node = self . stk . pop ( ) #NEWLINE# self . cur = node . right #NEWLINE# return node