```
class Solution(object):
def getMinimumDifference(self, root):
nums = self.inorder(root)
return min(nums[i+1]-nums[i] for i in range(len(nums)-1))
def inorder(self, root):
return self.inorder(root.left) + [root.val] + self.inorder(root.right) if root else []
```