```
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param {TreeNode} root
# @return {integer[]}
def inorderTraversal(self, root):
return [] if root is None else self.inorderTraversal(root.left) + [root.val] + self.inorderTraversal(root.right)
```