Minimum Absolute Difference in BST | Leetcode-530 | GOOGLE | Explanation ➕ Live Coding
Hi everyone, this is the 2nd video of our "Binary Search Tree" Playlist.
In this video we will try to solve an Easy but quite good Qn “Summary Ranges”.
We will write very easy and clean code.
We will do live coding after explanation and see if we are able to pass all the test cases.
Problem Name : Minimum Absolute Difference in BST
Company Tags : Google
My solutions on Github : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Tree/BST/Minimum%20Absolute%20Difference%20in%20BST.cpp
Leetcode Link : https://leetcode.com/problems/minimum-absolute-difference-in-bst/
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Highlights:
0:00 Introduction
1:15 Intuition
4:42 "IMPORTANT TECHNIQUE" to solve Multiple BST questions. Example : Validate BST
5:16 how to find the minimum abs difference without extra space?
5:28 code for InOrder of tree
8:23 before visiting the right node we assign the previous node to Root
14:38 TIME COMPLEXITY - O(N)
14:43 Code
17:21 Using prev as a global variable.
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview #interviewtips
#interviewpreparation #interview_ds_algo #hinglish