❔ How come shall the data type be int, not TreeNode?
https://leetcode.com/problems/validate-binary-search-tree/?envType=study-plan&id=level-1 It's about this question
I have tried the below solution
`
I know the logic is not right here, but some answers like this one set the data type of the List variable to
int, not
TreeNode` like I did. : https://leetcode.com/problems/validate-binary-search-tree/solutions/3327674/simple-c-code/?envType=study-plan&id=level-1&languageTags=csharp
Could anyone kindly explain to me why it is int, not TreeNode?LeetCode
Validate Binary Search Tree - LeetCode
Can you solve this real interview question? Validate Binary Search Tree - Given the root of a binary tree, determine if it is a valid binary search tree (BST).
A valid BST is defined as follows:
* The left subtree of a node contains only nodes with keys less than the node's key.
* The right subtree of a node contains only nodes with keys gre...
LeetCode
Simple C# code - Validate Binary Search Tree - LeetCode
View VikasSinghThakur07's solution of Validate Binary Search Tree on LeetCode, the world's largest programming community.
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.