Загрузка страницы

FACEBOOK CODING INTERVIEW QUESTION - VALIDATE BINARY SEARCH TREE

SOCIAL
----------------------------------------------------------------------------------------------------------------
Instagram: https://instagram.com/kevinnaughtonjr/
Twitter: https://twitter.com/KevinNaughtonJr
Patreon: https://www.patreon.com/KevinNaughtonJr
GitHub: https://github.com/kdn251

This is one of Facebook's most commonly asked interview questions according to LeetCode (2020)! Facebook coding interview question, validate binary search tree, coding solution. If you give me 5 minutes you'll thank me if this appears during your Facebook interview! Coding Interviews validate binary search tree (LeetCode) question and explanation.

DISCORD CHANNEL
----------------------------------------------------------------------------------------------------------------
To join the Discord channel use the following link and join the "Member" tier: https://www.patreon.com/KevinNaughtonJr In this Discord channel, you will be able to...
1. Ask me questions directly (as well as other members)
2. Ask about and discuss previous interview experiences
3. Find mock interview partners
4. Share helpful videos for interview preparation, and more!

This question is commonly asked by the following companies: Google

Link to problem: https://leetcode.com/problems/validate-binary-search-tree/

Intuition behind solution: continuously traverse downward in the tree at every node checking if the current node's value is in violation of our constraints. Our constraints include a maximum value and a minimum value that each node's value must adhere to. As we traverse down the tree we update those constraints. If we ever reach the bottom of the tree we return true, if we ever violate those constraints we return false, and otherwise, we continue traversing our tree recursively asking if our left subtree and right subtree are valid binary search trees.

MUSIC
----------------------------------------------------------------------------------------------------------------
Im The Black Tom Hanks (IG @uwumajora) by MAJORA🌸
https://soundcloud.com/uwumajora/im-the-black-tom-hanks

#techinterviews #leetcode #facebookinterview

Видео FACEBOOK CODING INTERVIEW QUESTION - VALIDATE BINARY SEARCH TREE канала Kevin Naughton Jr.
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
23 февраля 2020 г. 22:00:08
00:08:00
Яндекс.Метрика