[LC] Added solution to valid binary search tree.