Happy Birthday to the best DSA teacher on youtube!
@aws_handles5 күн бұрын
Happy Birthday to the 🐐 Goat of DSA teaching ❤
@Mohit_Q5 күн бұрын
kon bola aaj birthday hai ?
@dchennaraidu5 күн бұрын
Linkedin
@AyushKumar-e5j1v4 күн бұрын
Ane waale Samy me youtube ke sabse history creator teacher hone wale ho sir ❤
@prathameshpalkar5145 күн бұрын
I was able to do it myself, ty MIK Sir. I did with cumulative Sum and reverse cumulative sum and now I'm here for more clarity with your story. Happy Birthday Sir🥳🥳
@riteshhhhh_014 күн бұрын
Today's quote form my side:- "Be stronger than your stronger excuses, embrace the toughness, discipline and accept those pains because that is how you are going to built yourself", love your explainations MIK ✨
@aripact4 күн бұрын
Happy Birthday Bhaiya!!!❤❤❤
@tushar4044 күн бұрын
Khud ho gaya bhaiya Starting after endsem again after 17 days gap Good confidence booster!!☺☺☺☺☺
@slagnajit44764 күн бұрын
Happy birthday MIK bhaiya Thanks for every valuable add-ons❤🎉
@bhuppidhamii5 күн бұрын
I'm so happy, I was able to do it myself. Thanku MIK😊
@AnshikaGupta-l1e3 күн бұрын
happy birthday sir thank you so much for your efforts to explain a problem in such a easy way,you are such a amazing teacher of dsa
@simply_akh1l4 күн бұрын
Happy Birthday Sir 🙏🏻
@NitishRaj-q3s5 күн бұрын
Happy Birthday MIK BHAIYA! Brute force: class Solution { public: int waysToSplitArray(vector& nums) { int n = nums.size(); int split = 0; for(int i=0; i
@MystifiedBoy4 күн бұрын
Happy Birthday bhaiyaa ♥️ god bless you and may all your wishes come true and may God flood your life with happiness and all blessings always keep smiling 😊 Thanks for everything 😍
@hellsterkun87645 күн бұрын
Happy Birthday Mik Sir! Aaj bhi aapne aap hi solve ho gaya question: class Solution { public: int waysToSplitArray(vector& nums) { int n = nums.size(); long long sum = 0; int ans = 0; for (int i = 0; i < n; i++) { sum += nums[i]; } long long psum = 0; for (int i = 0; i < n - 1; i++) { psum += nums[i]; if (sum - psum
@sa_hilll944 күн бұрын
Happy Birthday Sir, May god bless with more knowledge and support 😁🎂
@India_mera_sabkuch4 күн бұрын
happy birthday GOAT ............you comes in my life where i need the most !!......sir please leetcode contest bhi solve karna start karoge kya aap?
@hellsterkun87645 күн бұрын
Hats off, sir, for your unmatched dedication, working tirelessly even on your birthday. Your commitment is true inspiration! Rest assured, I’ll always credit you for the success ahead.❤
@sumitgupta3104 күн бұрын
Happy Birthday bhaiya 🍾🥳
@salmaniproductions11044 күн бұрын
Happy Birthday bhaiyya.
@Anshul-qb2pm5 күн бұрын
happy birthday sir
@11csepratikshaargulewar715 күн бұрын
O lord, bless him in this day and in all the days of his life and grant him a long life .amen 🙏 happy birthday MIK sir
@AbhijeetMuneshwar4 күн бұрын
Respected MIK Sir, Happy Bithday 🥳🎂
@Playvish4 күн бұрын
Happy Birthday 🥳 MIK bhaiya
@salmaniproductions11044 күн бұрын
Solved by own, here is my code - int waysToSplitArray(vector& nums) { int ans =0; long long whole_sum = 0; long long sum=0; for(int x:nums) whole_sum+=x; for(int i=0;i=whole_sum) ans++; } return ans; } Thank you so much bhaiyya.
@AliGatez4 күн бұрын
Happy birthday MIK bhaiya❤🎉/
@deepbendudebnath96124 күн бұрын
Happiest Birthday bhaiya
@manishgaming46385 күн бұрын
Easy tha Solved on my own
@unknown478965 күн бұрын
Happy Birthday to the GOAT of DSA❤❤❤❤
@arnabsarkar52455 күн бұрын
Many many happy returns of the day bhaiya...
@HeetVichhivora5 күн бұрын
Happiest birthday Mik bhai may God bless you with infinite success🎉🎉🎉🎉
@priyajaiwal80724 күн бұрын
Happy New Year, Mazhar, and wish you a very happy birthday .Wish this year brings you more health, growth and fun. keep inspiring❤
@abhisheksingh-rz8nj5 күн бұрын
Happy Birthday Sir
@mokshgupta-mh3vu4 күн бұрын
Happy Birthday bhya
@HarmanSingh-nw6ix4 күн бұрын
wishing you a very very happy birthday bhaiya , may god help you achieve all your dreams as you help us achieving ours...♥♥♥
@IRONMAN-co7qg4 күн бұрын
HAPPY BIRTHDAY SIR
@minshal77134 күн бұрын
Happy birthday mik sir🎉🎂🎉
@arabindaparida40755 күн бұрын
Happy Birthday broh
@yashraj58985 күн бұрын
happy birthday sir, and please always include the brute force solution as it enhances the thinking ability of ours.
@aizad786iqbal4 күн бұрын
Happy Birthday MIK...
@shreyabajaj45885 күн бұрын
Happy Birthday Bhaiya ...
@hare_krishna84115 күн бұрын
bhaiya raadhe raadhe..❤❤
@abhisheksingh-rz8nj5 күн бұрын
Success is not final, failure is not fatal : its the courage to continue that counts.
@AbhishekKumar-hu2pz5 күн бұрын
Happy Birthday bro god bless u
@storytv7965 күн бұрын
Happy Birthday sir ji
@DevanshGupta-io7rl5 күн бұрын
happy birthday bhaiya
@harshugamer77765 күн бұрын
Happy Birthday 🥳
@bhuppidhamii5 күн бұрын
Happy Birthday bhaiya ❤
@ayushmanbaghel76595 күн бұрын
Happy Birthday GOAT for your subscribers ♥♥
@saminkhan1255 күн бұрын
Wising you a very happy birthday MIK
@divanshurawat89984 күн бұрын
Happy Birthday Bhayia🥳
@shaikhanif72685 күн бұрын
Happy Birthday bhaiya🎉
@anshul3112_5 күн бұрын
Happy Birthday Sir❤️✨
@ch0c0_15 күн бұрын
Waah mik bhai .. aaj mera bhi birthday h ... Happy birthday to us both❤
@aws_handles5 күн бұрын
Happy Birthday 🎉
@ch0c0_15 күн бұрын
@@aws_handles thanks
@bhuppidhamii5 күн бұрын
Happy Birthday 🎂
@mehranahmed36125 күн бұрын
happy birthday
@shubham765 күн бұрын
Happy Birthday 🎉 sir
@FanIQQuiz5 күн бұрын
Happy Birthday Guruji 🎂✨
@TronGotNoChill4 күн бұрын
Happy Birthday Boss❤
@m_fi89265 күн бұрын
HAPPY BIRTHDAY MIK
@godlovers53525 күн бұрын
Happy birthday sir ❤🎉
@rishabraj74325 күн бұрын
Happy BD guru
@sumatheultimategirl74775 күн бұрын
Happy Birthday mike🥳🥳🥳🥳💖💖
@vishwashsoni6105 күн бұрын
this is how i solved this question : TC: O(n) SC: O(n) class Solution { public: int waysToSplitArray(vector& nums) { int n = nums.size(); vectorprefixSum(n,0); prefixSum[0]=nums[0]; for(int i=1;i=0;i--){ suffixSum[i] = suffixSum[i+1]+nums[i]; } int count = 0; for(int i=0;i= suffixSum[i+1]){ count++; } } return count; } };
@himadrinath15024 күн бұрын
class SegmentTree { public: vector segTree; int n; SegmentTree(vector& nums) { n = nums.size(); segTree.resize(4 * n); buildTree(nums, 0, n - 1, 0); } void buildTree(vector& nums, int start, int end, int index) { if (start == end) { segTree[index] = nums[start]; return; } int mid = start + (end - start) / 2; buildTree(nums, start, mid, 2 * index + 1); buildTree(nums, mid + 1, end, 2 * index + 2); segTree[index] = segTree[2 * index + 1] + segTree[2 * index + 2]; } long long query(int start, int end, int left, int right, int index) { if (start > right || end < left) return 0; if (start >= left && end = rightSum) split++; } return split; } }; my solution using segment tree.
@aaronstn2234 күн бұрын
Happy birthday mik
@thefinalfit5 күн бұрын
Happy Birthday MIK 🎉
@kakshat225 күн бұрын
Happpy birthday MIK bro ❤🎉
@gauravmundhada16475 күн бұрын
Happy birthday❤
@joydeep-halder5 күн бұрын
Happy Birthday bhaiya 🎂🎂🎉🎉
@TheRUSHIZ4 күн бұрын
Happy Birthday Bhaiya!! can you please make a playlist of prefix sum
@shubhamsharma43534 күн бұрын
class Solution { public: int waysToSplitArray(vector& nums) { vector prefixSum; long sum = 0; for(auto it : nums){ sum += it; prefixSum.push_back(sum); } int n = nums.size(); int count = 0; for(int i = 0; i < n-1; i++){ if(prefixSum[i] >= prefixSum[n-1]-prefixSum[i]) count++; } return count; } }; //T.C->O(n) //S.C.->O(n)
@SRoy27005 күн бұрын
Approach 1: with prefixSum tc: O(N) SC:O(N) class Solution { public: int waysToSplitArray(vector& nums) { vector preFix(nums.size()); preFix[0] = nums[0]; for(int i=1 ;i
@100solarmass5 күн бұрын
class Solution: def waysToSplitArray(self, nums: List[int]) -> int: total_Sum, count, l_sum = sum(nums), 0, 0 for i in range(len(nums) - 1): l_sum += nums[i] total_Sum -= nums[i] if l_sum >= total_Sum: count += 1 return count ```java[] class Solution { public int waysToSplitArray(int[] nums) { int cnt = 0; long rSum = 0; long lSum = 0; for (int i = 0; i < nums.length; i++) { rSum += nums[i]; } for (int i = 0; i < nums.length - 1; i++) { lSum += nums[i]; rSum -= nums[i]; if (lSum >= rSum) cnt++; } return cnt; } }
@joydeep-halder5 күн бұрын
Aj ka question easy mark hona chahiye tha 😅. I've derived one more equation. we can directly check if( 2*leftSum >= totalSum). [ Basically leftSum >= totalSum/2]
@UTKARSHSHUKLAIIITT5 күн бұрын
C++ code of Prefix Sum Approach: class Solution { public: int waysToSplitArray(vector& nums) { int n = nums.size(); vectorprefixSum(n); prefixSum[0] = nums[0]; for(int i =1;i
@harshitkaundal63733 күн бұрын
Happy Birthday Bro, Sorry late hogya
@AyushKumar-e5j1v4 күн бұрын
Sir koi bola hai maine 150 q? Kiye hai koi bolta hai 200 q? Kite ayr vo google microsoft main h Bt hme to jyada q? Ladta hai main demotivate ho jata hu kya kru?; sir video bana ke explain kr do i m your 1'st subscriber please sir
@imPriyansh774 күн бұрын
Prefix Sum - Easy Problem
@YogeshShinde-l4b4 күн бұрын
Vote for Mike DSA sheet
@DevanshGupta-io7rl5 күн бұрын
int waysToSplitArray(vector& nums) { int n=nums.size(),cnt=0; vectorprefsum(n); prefsum[0]=nums[0]; for(int i=1;i
@sauravchandra104 күн бұрын
Python implementation: class Solution: def waysToSplitArray(self, nums: List[int]) -> int: totSum = sum(nums) preSum = 0 cnt = 0 for i in range(len(nums)-1): preSum += nums[i] if preSum >= totSum - preSum: cnt += 1 return cnt A happy new year and a very happy birthday to you! ❤
@AnkushKaudi4 күн бұрын
Saw today's problem statement, figured out the optimal solution in
@Amanbiragi175 күн бұрын
Using PrefixSum of the Array public int waysToSplitArray(int[] arr) { int n = arr.length; long[] prefSum = new long[n]; prefSum[0]=arr[0]; for(int i=1;i
@ishikacasley27864 күн бұрын
//using prefix sum Array class Solution { public: int waysToSplitArray(vector& nums) { int n = nums.size(); vector prefix(n); prefix[0] = nums[0]; for (int i = 1; i < n; i++) { prefix[i] = prefix[i - 1] + nums[i]; } long long leftSum = 0; long long rightSum = 0; int count = 0; for (int i = 0; i < n - 1; i++) { leftSum = prefix[i]; rightSum = prefix[n - 1] - leftSum; if (leftSum >= rightSum) { count++; } } return count; } };
@jeehub0415 күн бұрын
Bhaiya kya isse one pass me bhi kia jaa sakta ha like without calculating total sum initially?
@universalcosmologist36754 күн бұрын
bro pls make video on line sweep algorithm plssss i request 🙏🙏🙏🙏🙏🙏🙏🙏
@gui-codes5 күн бұрын
Sir aaj Birthday me to rest karlo 😅. Happy Birthday Legend ❤
@Dnsndy5 күн бұрын
Happy Birthday bhaiya ,,, May MataRani Mahadev Bless U Whenever i see your video bhaiya i get to know more optimise solutions I submitted the solution with space complexity : O(n) using prefix array class Solution { public: int waysToSplitArray(vector& v) { int n = v.size(); long long preSum = 0; vector pre(n, 0); for(int i = 0; i < n; i++) { preSum += v[i]; pre[i] = preSum; } int ans = 0; for(int i = 0; i < n - 1; i++) { if(pre[i] >= (pre[n - 1] - pre[i])) ans++; } return ans; } };
@prajwalshaw92174 күн бұрын
Hello sir. Can u make a video on LC 3404...count special subsequences. This question was asked in LC weekly last week and this problem was also asked in Google OA. It would be a great help if u could make a video on this particular question. Thank u.
@sayyedrehan-y1j4 күн бұрын
Bhaiya i have a doubt please solve, should i directly use your topic wise playlist to solve problems, i am a bit confused. Is it good to solve problems from your playlists, i will solve problem by my own first then watch the solution from your video, is that good or there is any better approach.
@arjunkumaryadav81024 күн бұрын
Bhaiya mere vlg me company nahi aati hai ...muje kya karna chahiye aur jyada project par bhi kam nahi karta hu ..but DSA ata hai jo kuch bhi aap se seekha hai bus utna hi aata hai
@Vibhanshushrivastava3 күн бұрын
sir please leetcode 3409 , its a biweekly 147 contest question, kch smjh ni pdrha kya hua isme , pretty hard question i would say
@DevanshGupta-io7rl5 күн бұрын
typedef long long ll; int waysToSplitArray(vector& nums) { int n=nums.size(); int cnt=0; ll sum=accumulate(nums.begin(),nums.end(),0ll); ll Lsum=0; ll Rsum=0; for(int i=0;i=Rsum) cnt++; } return cnt; } ho gya accumulate mai fasa tha nayi cheez seekh lii aaj 0ll lagana zaruri hai
@B-Billy5 күн бұрын
Java Solution Using Prefix Sum class Solution { long[] prefixSum; public int waysToSplitArray(int[] nums) { int n = nums.length; prefixSum = new long[n]; int count = 0; long totalSum = nums[0]; prefixSum[0] = nums[0]; for(int i=1; i= rSum) count++; } return count; } }
@algosafari4 күн бұрын
Sir ek aur question tha aapne el for loop bahar aur ek and use kiya h to tc to abi bhi 0(N^2) hogi na someone pls clear my doubt
@gauravparasar45714 күн бұрын
bhiyaa aaj agya h oa ka link 5 din hai abhi dene k liye to kya kya prep kru plsssss help krdo pehli br dunga mujhe dar lagra hai
@akashsahoo24213 күн бұрын
bro can you make a video on gfg today potd(04-01-25) ,i.e on Count all triplets with given sum in sorted array, its different from the simply counting the triplets that sum to the target,because here we have to count to the duplicates also,no proper video is available on youtube.
@girlwithwings49035 күн бұрын
silly doubt - abhi bhi to loop do baar cahl raha hai to TC n2 kyu nhi hai 😐
@algosafari5 күн бұрын
sir maine first wale code bhi try kiya but usse TLE aa ja rha h class Solution { public: int waysToSplitArray(vector& nums) { int splitCount =0; for (int i =0 ;i
@AyushKumar-e5j1v4 күн бұрын
Sir log bolte hai main 150 kiya koi bola hai 300 kiya aur google meta amazone hai is wakt bt hame kyu jyada q? Lag rhe hai solve krne ko mera consept clear hota hai apke video se kya aap video bna ke bata sakte ho 2025 me mujhe bhi mncs jana hai jo apse hi possible hai 🙏🙏🙏
@Rahulkumar-bn4tk5 күн бұрын
Bhaiya Mare se Question Nhi ban Paaa rhe almost mere DSA karte huyee 6 to 7 month ho chuke hai .. bhaiya kya karu ... kaise practice karu
@shresthgupta26705 күн бұрын
Bro koi problem nahi bass time invest karte rahoo in learning, kuch din baad ABCD jaise hoo jae gaa
@Rahulkumar-bn4tk4 күн бұрын
@@shresthgupta2670 bro like bht din ho gaye hai almost maine 180 problem solve kar chuka huaa like tab v problem bht hote hai like her ek problem meh stuck hp jata hu :(
@shresthgupta26703 күн бұрын
@@Rahulkumar-bn4tkhaa i know is solved many questions but still stuck , only one thing we do practice practice practices its like integration we do in school
@RohitKumar-dz8dh5 күн бұрын
Many many happy returns of the day to my Poineer 🙇🙇🙇. here is your given task for this problem--> int n = nums.length; long prefix[] = new long[n]; int split = 0; //populate prefix sum array prefix[0] = nums[0]; for(int i=1;i