# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution(object):
def inorderTraversal(self, root):
"""
:type root: TreeNode
:rtype: List[int]
"""
r = []
def in_order(node, result):
if node and node.left:
in_order(node.left, result)
if node:
result.append(node.val)
if node and node.right:
in_order(node.right, result)
return result
return in_order(root, r)