© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
3 replies
morry329#

❔ Comprehension questions for the LC solution

So I take a look at this solution right now: https://leetcode.com/problems/validate-binary-search-tree/solutions/3327674/simple-c-code/?envType=study-plan&id=level-1&languageTags=csharp

There are a couple of lines I did not understand fully.

1. the check
l[i]>=l[i+1]
l[i]>=l[i+1]
in the bool method. What could it mean?
2. In the helper method (
Inorder
Inorder
) the
 root.val 
 root.val 
is added after the list looks at the left node of the root node and
before
before
it looks at the right node of the root node. Why is it like that?

Could anyone kindly explain those to me?
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.
Simple C# code - Validate Binary Search Tree - LeetCode
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ ✅ comprehension questions for a LeetCode puzzle
C#CC# / help
3y ago
✅ Comprehension questions (LeetCode Binary Search)
C#CC# / help
3y ago
✅ Gaps in understanding a LC solution
C#CC# / help
3y ago
Solution for lots of flags
C#CC# / help
12mo ago