Wish you a very very Happy Birthday Ankit ❤️❤️❤️ Guys let’s all wish him and make his day 😇🎉🎊🎁🎈🎂
@AbhijeetMuneshwar6 ай бұрын
Happy Birthday, Ankit 🍰🎉
@varunpalsingh38226 ай бұрын
Happy Birthday bro, Enjoy your day 🎊🎉
@Himanshh_296 ай бұрын
Happy Birthday Ankit 🥳
@AbhijeetMuneshwar6 ай бұрын
Respected MIK Sir, Leetcode publishes new problem of the day at 5:30 AM daily. You've published this video just after an hour. Hats off to your dedication and efforts. 🙏🙇 You're an inspiration ⚡
@codestorywithMIK6 ай бұрын
Means a lot ❤️🙏
@vishalkurve936 ай бұрын
@@codestorywithMIKReally sir you are helping us a lot🙌🙌🙌🥹
@gui-codes6 ай бұрын
Banda legend hai yaar. Itna determination chaie bas life me.
@kaustubhchaudhari98386 ай бұрын
First shortest video of MIK bhai ever seen
@rajatrajgautam32246 ай бұрын
but bhai worth it h
@gui-codes6 ай бұрын
ha ha sahi baat. but video is gem as always.
@molyoxide83586 ай бұрын
Go see his shorts, even more shorter. Just joking buddy.
@adsnehi6 ай бұрын
I am not able to solve any daily challenge problem. but after watching 25% of you video I am able to solve it
@krunalkp1032Ай бұрын
Hi Mik you are really doing a great job you way of teaching is really nice, I code in python hence i watch your all video till the coding part and am able to do it by my self. Thanks much recursion is indeed work magically. Python Code : class Solution: def balanceBST(self, root: Optional[TreeNode]) -> Optional[TreeNode]: arr = [] def inorder(root): nonlocal arr if root is None: return inorder(root.left) arr.append(root.val) inorder(root.right) inorder(root) def makebalance(left,right,arr): if left > right: return None mid = left + (right - left) // 2 root = TreeNode(arr[mid]) root.left = makebalance(left,mid-1,arr) root.right = makebalance(mid+1,right,arr) return root left = 0 right = len(arr) - 1 return makebalance(left,right,arr)
@rohan87585 ай бұрын
Awesome explanation bhaiyan, You are like a angel to me who is leading me towards to crack FAANG or product based companies interview.
@Lakshya-f4l6 ай бұрын
"Recursion leap of faith" . . . Thankyou sir!
@abhinaysahuu6 ай бұрын
sir aapki explanations really the best h. mene ek striver ki binary tree ki video dekhi, smjh ni aaya code, aapki video dekhi, easily aa gya. please keep up the good work sir !
@manasdeora46016 ай бұрын
Sir, you have been helping many like me understand the concepts in deep. Thankyou so much for your efforts.
@CarWarYaar6 ай бұрын
Bhaiya aap bhot acha samjhate ho , dsa ke saare patterns pe koi video bana dijiye , question identify krne me problem hoti hai mostly
@Abhishek-y6i3j6 ай бұрын
short and crisp explanation thanks for this .
@manojitsaha62626 ай бұрын
AVL Tree 🙂 Mujhe college ka kuch samajh nahi ata apke video se samjha ye concept acche se ❤❤❤
@raunakgiri50336 ай бұрын
It would be very helpful, if you also provide contest video solution, specially only problem D. Thanks.
@gauravbanerjee28986 ай бұрын
Thanks a lot bhaiya ❤❤
@ReshuSharma-jc7yu6 ай бұрын
Bhaiya your segment tree playlist is awesome and looking forward for your backtracking and heap playlist
@meesalamahesheee_00566 ай бұрын
Sir, how did you gain so much knowledge and become consistent in DSA? What experiences and difficulties did you face during your initial stages in DSA, please tell?
@aws_handles6 ай бұрын
Guruji 🙌🙏🏻
@gui-codes6 ай бұрын
MIK bhai zinda baad
@bhuppidhamii6 ай бұрын
East ho ya West, MIK is best.
@venkatarohitpotnuru386 ай бұрын
bhaiyya please do problems on partition dp
@codestorywithMIK6 ай бұрын
Soon planning in dp concepts playlist ❤️
@nish07986 ай бұрын
@@codestorywithMIK also please try to give tips how to be good at bottomup and when are u planning to do dp concepts and how amny videos estimated
@venkatarohitpotnuru386 ай бұрын
@@codestorywithMIK Thank you bhaiyya..
@ropurifiedwater6 ай бұрын
@@codestorywithMIK thank you sir
@FanIQQuiz6 ай бұрын
Resursion ❌ Kahani (story) ✅
@aizad786iqbal6 ай бұрын
awesome
@dayashankarlakhotia49436 ай бұрын
Good explanation 👏 👍
@AdarshSingh-is6mg6 ай бұрын
bhaiya aap sheet recommend krskte ho koi for interview prep.
@Coder_Buzz076 ай бұрын
"College mein yeh problem karaya hoga" - college mein kuch nhi karata bhaiya sab khudse karte hai hum log😂😂
@kartikforwork6 ай бұрын
karwata hai na clg, maths, phy, chem, dip, human values, tecnical communication ... me time waste
@Coder_Buzz076 ай бұрын
@@kartikforwork 😂🤣🤣sahi bole bhai
@imPriyansh776 ай бұрын
Thank you bhaiya
@jeehub0416 ай бұрын
Sir jo new tree hum log construct kar rahe usko bhi toh space complexity me consider karenge na?
@pokeindia53616 ай бұрын
Bhaiya please wo palindromic substringa ka blue print aapne diya tha uske variant karwao please..... Abhi placements aa rahe h
@dhairyachauhan66226 ай бұрын
This is how i did it. was wondering, how to do it inplace, i know AVL TREE but never implement the rotation. Even after being decent in recursion, it is difficult for me to implement it 😅 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {} * }; */ class Solution { public: vectorinorder; void fillInorder(TreeNode* root){ if(root == NULL){ return; } fillInorder(root->left); inorder.push_back(root->val); fillInorder(root->right); } TreeNode* makeTree(TreeNode*root,int start,int end){ if(start > end){ return NULL; } int mid = start + (end-start)/2; TreeNode * node = new TreeNode(inorder[mid]); node->left = makeTree(root,start,mid-1); node->right = makeTree(root,mid+1,end); return node; } TreeNode* balanceBST(TreeNode* root) { fillInorder(root); return makeTree(root,0,inorder.size()-1); } };
@rhydhamsingla95976 ай бұрын
Bhaiya please make a separate video on DSW algorithm. I wanted to learn it and there is no video tutorial available. I checked those which were available, they don't explain any near to you. Please help!
@bhaktisharma96816 ай бұрын
Mujhe BST ki playlist he nahi mill rahi hai, koi pls share kar sakt hai uska link?
LC 3193 kara do pls. Baaki jagah se samjh hi nhi aa rha. Count inversion wala
@rahulnegi40276 ай бұрын
us bro us
@focusman88016 ай бұрын
@codestorywithMIK Bhaiya please count inversion wala bana do
@10minutes_cs6 ай бұрын
yes please, male video on this.
@__ankush_kushwaha6 ай бұрын
❤❤❤
@top_g7556 ай бұрын
Sir segment tree plz
@Rajdweep6 ай бұрын
man i didn't get the intuition for this
@yogeshchauhan94016 ай бұрын
In the if u are checking nums[idx]
@theUnkown6176 ай бұрын
arre bhaiya DSW bhi padha dete na 😭 me vohi padhne aya tha pr apne dokha de diya
@mayank15226 ай бұрын
yaha par l > r kese hoga , l increase kese ho rha h ya r decrease kese ho rha
@yogeshchauhan94016 ай бұрын
We are recursively passing them in the function like for left subtree construct(l,mid-1) and for right subtree(mid+1,r) and as a base case we are checking is l>r that means there is no more element to process so we return NULL.
@ManojKrVerma-vw4dx6 ай бұрын
What is the issue with this code ? /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {} * }; */ class Solution { public: void helper(TreeNode* root, vector &sorted) { if (root == NULL) return; helper(root->left, sorted); sorted.push_back(root); helper(root->right, sorted); } TreeNode* balancedBST(vector sorted, int l, int h) { if (l > h) return NULL; if (l==h){ return sorted[l]; } int m = (h+l) / 2; TreeNode* root = sorted[m]; root->left = balancedBST(sorted, l, m - 1); root->right = balancedBST(sorted, m + 1, h); return root; } TreeNode* balanceBST(TreeNode* root) { // first get sorted vector vector sorted; helper(root, sorted); //return NULL; return balancedBST(sorted, 0, sorted.size()-1); } };
@nish07986 ай бұрын
public int subarraySum(int[] nums, int k) { // Call the helper function with an initial sum of 0 return helper(nums, k, 0); } private int helper(int[] nums, int k, int idx) { if(idx>=nums.length) { if(k==0) { return 1; } return 0; } int take=0; if(nums[idx]
@nish07986 ай бұрын
@codestorywithMIK please reply
@molyoxide83586 ай бұрын
Bro my code is not running pls help me: class Solution { public: int n = 0; vector arr; TreeNode* newRoot = NULL; TreeNode* temp = NULL; void SolveLeft(int l, int r, vector &arr) { if(lleft = new TreeNode(arr[mid]); temp = temp->left; SolveLeft(l, mid-1, arr); } } void SolveRight(int l, int r, vector &arr) { if(lright = new TreeNode(arr[mid]); temp = temp->right; SolveRight(mid+1, n-1, arr); } } void Inorder(TreeNode* root) { if(root != NULL) { Inorder(root->left); arr.push_back(root->val); Inorder(root->right); } } TreeNode* balanceBST(TreeNode* root) { Inorder(root); n = size(arr); int mid = (0+n-1)/2; newRoot = new TreeNode(arr[mid]); temp = newRoot; SolveLeft(0, mid-1, arr); temp = newRoot; SolveRight(mid+1, n-1, arr); return newRoot; } };