Skip to content

Leetcode validate binary search tree#26

Open
Igneaalis wants to merge 24 commits intomasterfrom
LEETCODE-validate-binary-search-tree
Open

Leetcode validate binary search tree#26
Igneaalis wants to merge 24 commits intomasterfrom
LEETCODE-validate-binary-search-tree

Conversation

@Igneaalis
Copy link
Copy Markdown
Owner

Added LEETCODE "validate-binary-search-tree" recursive solution.

Igneaalis added 23 commits May 13, 2020 20:53
@Igneaalis Igneaalis requested a review from Vivelapaix June 4, 2020 22:31


class Solution(object):
def isValidBST(self, _root, first=True):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо написать решение похожее на postOrder, когда ты передаешь нужные границы в левый рекурсивный вызов и в правый рекурсивный вызов. Далее тебе возвращаются булевы значения, что в поддеревьях все хорошо или нет

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавил решение

@Igneaalis Igneaalis added the review Review requested label Jun 5, 2020
@Igneaalis Igneaalis requested a review from Vivelapaix June 5, 2020 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review Review requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants