Mark As Completed Discussion

Let's test your knowledge. Fill in the missing part by typing it in.

The following is working code validating a Binary Search Tree in Python.

SNIPPET
1class Solution:
2  def is_valid_bst(self, root):
3    output = []
4    self.in_order(root, output)
5    
6    for i in range(1, len(output)):
7      if output[i-1] >= output[i]:
8        return False
9
10    return True
11
12  def in_order(self, root, output):
13    if root is None:
14      return
15    ____________________________________
16    output.append(root.val)
17    self.in_order(root.right, output) 

Write the missing line below.