Пікірлер
@ankitswain6651
@ankitswain6651 5 сағат бұрын
just found a gold mine ,thanks for the content............ Bro i just wanted to ask most of the time ,most of the time i am able to figure out the logic but implementation of it is where i get i get stuck...... how can i overcome this
@5minutescode
@5minutescode 3 сағат бұрын
You can overcome this with practice. Give at least 30 minutes to any question, sit with pen and paper, and try all possible ways.
@ayangattani
@ayangattani 2 сағат бұрын
@@5minutescode thank you brother.
@shreyamishra5636
@shreyamishra5636 8 сағат бұрын
nice explanation but can you make it a bit more interactive for beginners(i was so sleepy after watching this lecture).
@5minutescode
@5minutescode 3 сағат бұрын
haha I was also sleepy while recording this video.
@5minutescode
@5minutescode 15 сағат бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 15 сағат бұрын
linkedin.openinapp.co/pk0r4 Check out this cool extension with which you can unlock DSA video tutorial instantly on GeeksforGeeks and leetcode with a single click. Its completely safe. Let me know if you have any suggestions.
@5minutescode
@5minutescode Күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode Күн бұрын
linkedin.openinapp.co/pk0r4 Check out this cool extension with which you can unlock DSA video tutorial instantly on GeeksforGeeks and leetcode with a single click. Its completely safe. Let me know if you have any suggestions.
@Chirag-dv8ri
@Chirag-dv8ri Күн бұрын
Nice bro 👏Explained perfectly , easy and understandable.
@5minutescode
@5minutescode Күн бұрын
thanks buddy
@5minutescode
@5minutescode 2 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 2 күн бұрын
chromewebstore.google.com/detail/dsa-video-solutions/fplacgmeefidnohgepjcnabcaakfbknm Check out this cool extension with which you can unlock DSA video tutorial instantly on GeeksforGeeks and leetcode with a single click. Its completely safe. Let me know if you have any suggestions.
@ayannema8207
@ayannema8207 3 күн бұрын
plss provide the name of drawing extension that you use
@5minutescode
@5minutescode 3 күн бұрын
page marker
@r2editx
@r2editx 3 күн бұрын
sir the space complexity will be o(n) but in question space should beO(1)
@5minutescode
@5minutescode 3 күн бұрын
yes I realized after making video.
@newglobal2056
@newglobal2056 3 күн бұрын
Easy peasy Q's, i solved this using sliding window-O(n,1).
@5minutescode
@5minutescode 3 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 3 күн бұрын
chromewebstore.google.com/detail/dsa-video-solutions/fplacgmeefidnohgepjcnabcaakfbknm Check out this cool extension with which you can unlock DSA video tutorial instantly on GeeksforGeeks and leetcode with a single click. Its completely safe. Let me know if you have any suggestions.
@Himanshu-if5gm
@Himanshu-if5gm 4 күн бұрын
noice❤
@5minutescode
@5minutescode 4 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 4 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@Chirag-dv8ri
@Chirag-dv8ri 5 күн бұрын
Nice Explanation❣️, it's getting so well day by day 👏🏻
@5minutescode
@5minutescode 5 күн бұрын
thanks bro
@81_monish_roy74
@81_monish_roy74 5 күн бұрын
Thanks for the solution brother!! Very well explained!!😊😊😊😊
@5minutescode
@5minutescode 5 күн бұрын
thanks
@ShivShambhu-b1f
@ShivShambhu-b1f 5 күн бұрын
W
@5minutescode
@5minutescode 5 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 5 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@AjeetTiwari018
@AjeetTiwari018 5 күн бұрын
Please daily vedio laiyega
@5minutescode
@5minutescode 5 күн бұрын
yes sure
@pranavsutar3294
@pranavsutar3294 6 күн бұрын
Thanks for your guidance. Please upload playlist on Advance DSA with Java. Topics like Tree,Graph,etc.
@himadrinath1502
@himadrinath1502 Күн бұрын
start up ask dsa how priyansh agarwal cracked Zomato off campus in this guy was full cp
@5minutescode
@5minutescode 6 күн бұрын
Guys please subscribe. Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 6 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@hschannel7490
@hschannel7490 7 күн бұрын
class Solution: def pattern(self, N): # code here def helper(n, flag): if flag: if n <= 0: return helper(n, False) else: return [n] + helper(n - 5, True) else: if n > N: return [] else: return [n] + helper(n + 5, False) return helper(N, True) Bro I stucked here from 2 hours. It is gfg recursion, problem name is print pattern. My code time limit exceeded. Please help me bro. Please give optimized version
@5minutescode
@5minutescode 7 күн бұрын
Guys please subscribe. Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 7 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@user-fz1cj8rh6k
@user-fz1cj8rh6k 7 күн бұрын
Please provide the code for second approach..........
@5minutescode
@5minutescode 7 күн бұрын
kzbin.info/www/bejne/j366m4SaqKqnfZIsi=FDdx4VeAhhMGc1Yp
@user-fz1cj8rh6k
@user-fz1cj8rh6k 7 күн бұрын
English please, you are having audience from south also....
@5minutescode
@5minutescode 7 күн бұрын
sure sure
@ganeshjaggineni4097
@ganeshjaggineni4097 8 күн бұрын
NICE SUPER EXCELLENT MOTIVATED
@NoName-rz6gj
@NoName-rz6gj 8 күн бұрын
Plz continue in english iam from tamil nadu
@5minutescode
@5minutescode 8 күн бұрын
sure
@janhhod2384
@janhhod2384 8 күн бұрын
teach in hindi
@storybeat3045
@storybeat3045 8 күн бұрын
very nice but sir pls continue with hindi cause approach hindi m hi connect ho pata hai
@5minutescode
@5minutescode 8 күн бұрын
Try to connect in English as well. Believe me, It will really help in interviews.
@djangoaj
@djangoaj 8 күн бұрын
please provide the code in python🐍 also in your github class Solution: def countTriplets(self, arr, target): n = len(arr) ans = 0 for i in range(n - 2): j, k = i + 1, n - 1 while j < k: total = arr[i] + arr[j] + arr[k] if total < target: j += 1 elif total > target: k -= 1 else: e1, e2 = arr[j], arr[k] c1, c2 = 0, 0 # Count occurrences of e1 while j <= k and arr[j] == e1: c1 += 1 j += 1 # Count occurrences of e2 while j <= k and arr[k] == e2: c2 += 1 k -= 1 if e1 == e2: ans += (c1 * (c1 - 1)) // 2 else: ans += c1 * c2 return ans
@arpan_b
@arpan_b 8 күн бұрын
sir please give the link of that first hashmap explanation
@5minutescode
@5minutescode 8 күн бұрын
kzbin.info/www/bejne/j366m4SaqKqnfZIsi=FDdx4VeAhhMGc1Yp
@vamsivemula3601
@vamsivemula3601 8 күн бұрын
explain in english..
@5minutescode
@5minutescode 8 күн бұрын
sure
@Chirag-dv8ri
@Chirag-dv8ri 8 күн бұрын
Nice explanation 💖💖, But can we get next videos in little louder voice. 😊
@5minutescode
@5minutescode 8 күн бұрын
Suree
@UchihaKakarotYT
@UchihaKakarotYT 8 күн бұрын
Also one request, try to explain everyday's solution with unordered map as well if it is applicable, because that way people will get familiar with it. I see that the last three day's problems can be simply solved with unordered_map including today's So I would suggest, you can explain the approach which you wanted, and add a bonus part of the video where you can explain the unordered_map approach. I saw the below code in GfG comments section int countTriplets(vector<int>& arr, int target) { unordered_map<int, int> freq; for (int e : arr) { freq[e]++; } int ans = 0; for (int i = 0; i < arr.size(); i++) { freq[arr[i]]--; // Remove the current element from the frequency map for (int j = 0; j < i; j++) { // Traverse from 0 to i (exclusive) int lookfor = target - arr[i] - arr[j]; if (freq.find(lookfor) != freq.end()) { ans += freq[lookfor]; } } } return ans; } But it is difficult to follow and understand for a beginner, still the solution seems more simpler Thanks for your efforts
@spaaclub5212
@spaaclub5212 8 күн бұрын
Please continue this series it really help student like us.
@5minutescode
@5minutescode 8 күн бұрын
Sure
@UchihaKakarotYT
@UchihaKakarotYT 8 күн бұрын
Hi, Great Video, Thanks, And please continue teaching in English
@5minutescode
@5minutescode 8 күн бұрын
Noted.
@supriyakumari7488
@supriyakumari7488 8 күн бұрын
potd in gfg ek fix time ke baad(time exceed) usko solve karne pr usko consider nahi kiya jata hai kya???? i solved the problem but more than the time limit so they didn't give me geekbits and also not continue my streak
@5minutescode
@5minutescode 8 күн бұрын
no idea about this
@NITHYAKALYANIEECE-
@NITHYAKALYANIEECE- 8 күн бұрын
Teach only in english sir I m from tamilnadu if uh teach in hindi i don't get the things Moreover I watch uh're video only i do daily challenge
@5minutescode
@5minutescode 8 күн бұрын
Sure, will continue in English.
@kartikkaushik4743
@kartikkaushik4743 8 күн бұрын
contrain maximum which is applied is till 10^5 in the question ,so how can we choose this 10^6 constraint using two for loops ?
@5minutescode
@5minutescode 8 күн бұрын
arr.size max can be 10^3 only.
@newglobal2056
@newglobal2056 8 күн бұрын
Initially I used binary search but because of duplicate elements it gave me WA...
@5minutescode
@5minutescode 8 күн бұрын
yess. I hope it will be clear now.
@newglobal2056
@newglobal2056 8 күн бұрын
@@5minutescode Yes 🙏🧡
@shubhamgaming1641
@shubhamgaming1641 8 күн бұрын
u can still use binary search int countTriplets(vector<int> &arr, int target) { int n = arr.size(); sort(arr.begin(), arr.end()); int ans = 0; for(int i = 0; i < n-2; i++){ for(int j = i+1; j < n-1; j++){ int req = target - (arr[i] + arr[j]); auto low = lower_bound(arr.begin()+j+1, arr.end(), req); auto high = upper_bound(arr.begin()+j+1, arr.end(), req); ans += (high-low); } } return ans; }
@newglobal2056
@newglobal2056 8 күн бұрын
@@shubhamgaming1641 yah!! Thanks bro 🙂 Btw array is already sorted no need to sort..
@newglobal2056
@newglobal2056 8 күн бұрын
Yah!! Thanks bro 🙂 Btw array is already sorted no need to sort explicitly..
@bijaypankaj7263
@bijaypankaj7263 8 күн бұрын
Thanks Bro for explaining
@5minutescode
@5minutescode 8 күн бұрын
happy to help
@5minutescode
@5minutescode 8 күн бұрын
Guys please subscribe. Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode
@5minutescode 8 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@kumkumslab5811
@kumkumslab5811 9 күн бұрын
nice