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

FACEBOOK - KTH SMALLEST ELEMENT IN A BST (LeetCode)

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 (2019)! Kth Smallest Element in a BST coding solution. If you give me 5 minutes you'll thank me if this appears during your Facebook interview! Coding Interviews Kth Smallest Element in a BST (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: Facebook, Uber, Microsoft, Oracle, and TripleByte.

Link to problem: https://leetcode.com/problems/kth-smallest-element-in-a-bst/

Intuition behind solution: Realize the kth smallest element is the kth element in the inorder traversal of the tree. Traverse the tree by using an inorder traversal. Use an integer array to keep track of 2 things...1. which element you're on in the traversal (1st smallest, 2nd smallest, etc) and 2. the kth smallest value in the tree. Once you reach the kth element in the inorder traversal, store it in your integer array and return. Once you have returned from your inorder traversal, return the kth smallest value from your integer array.

MUSIC
----------------------------------------------------------------------------------------------------------------
Migos - Bad And Boujee (Kvzmah Lofi Remix)pt. 2 by KVZMAH
https://soundcloud.com/kvzmah/migos-bad-and-boujee-betaone-lofi-remixpt-2

#techinterviews #leetcode #softwareengineer

Видео FACEBOOK - KTH SMALLEST ELEMENT IN A BST (LeetCode) канала Kevin Naughton Jr.
Показать
Комментарии отсутствуют
Введите заголовок:

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

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

Зарегистрируйтесь или войдите с
Информация о видео
25 ноября 2019 г. 7:30:01
00:09:19
Яндекс.Метрика