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
@5minutescode3 сағат бұрын
You can overcome this with practice. Give at least 30 minutes to any question, sit with pen and paper, and try all possible ways.
@ayangattani2 сағат бұрын
@@5minutescode thank you brother.
@shreyamishra56368 сағат бұрын
nice explanation but can you make it a bit more interactive for beginners(i was so sleepy after watching this lecture).
@5minutescode3 сағат бұрын
haha I was also sleepy while recording this video.
@5minutescode15 сағат бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode15 сағат бұрын
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Күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@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Күн бұрын
Nice bro 👏Explained perfectly , easy and understandable.
@5minutescodeКүн бұрын
thanks buddy
@5minutescode2 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode2 күн бұрын
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.
@ayannema82073 күн бұрын
plss provide the name of drawing extension that you use
@5minutescode3 күн бұрын
page marker
@r2editx3 күн бұрын
sir the space complexity will be o(n) but in question space should beO(1)
@5minutescode3 күн бұрын
yes I realized after making video.
@newglobal20563 күн бұрын
Easy peasy Q's, i solved this using sliding window-O(n,1).
@5minutescode3 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode3 күн бұрын
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-if5gm4 күн бұрын
noice❤
@5minutescode4 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode4 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@Chirag-dv8ri5 күн бұрын
Nice Explanation❣️, it's getting so well day by day 👏🏻
@5minutescode5 күн бұрын
thanks bro
@81_monish_roy745 күн бұрын
Thanks for the solution brother!! Very well explained!!😊😊😊😊
@5minutescode5 күн бұрын
thanks
@ShivShambhu-b1f5 күн бұрын
W
@5minutescode5 күн бұрын
Guys please subscribe. 🙏🙏 Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode5 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@AjeetTiwari0185 күн бұрын
Please daily vedio laiyega
@5minutescode5 күн бұрын
yes sure
@pranavsutar32946 күн бұрын
Thanks for your guidance. Please upload playlist on Advance DSA with Java. Topics like Tree,Graph,etc.
@himadrinath1502Күн бұрын
start up ask dsa how priyansh agarwal cracked Zomato off campus in this guy was full cp
@5minutescode6 күн бұрын
Guys please subscribe. Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode6 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@hschannel74907 күн бұрын
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
@5minutescode7 күн бұрын
Guys please subscribe. Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode7 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣
@user-fz1cj8rh6k7 күн бұрын
Please provide the code for second approach..........
English please, you are having audience from south also....
@5minutescode7 күн бұрын
sure sure
@ganeshjaggineni40978 күн бұрын
NICE SUPER EXCELLENT MOTIVATED
@NoName-rz6gj8 күн бұрын
Plz continue in english iam from tamil nadu
@5minutescode8 күн бұрын
sure
@janhhod23848 күн бұрын
teach in hindi
@storybeat30458 күн бұрын
very nice but sir pls continue with hindi cause approach hindi m hi connect ho pata hai
@5minutescode8 күн бұрын
Try to connect in English as well. Believe me, It will really help in interviews.
@djangoaj8 күн бұрын
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_b8 күн бұрын
sir please give the link of that first hashmap explanation
Nice explanation 💖💖, But can we get next videos in little louder voice. 😊
@5minutescode8 күн бұрын
Suree
@UchihaKakarotYT8 күн бұрын
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
@spaaclub52128 күн бұрын
Please continue this series it really help student like us.
@5minutescode8 күн бұрын
Sure
@UchihaKakarotYT8 күн бұрын
Hi, Great Video, Thanks, And please continue teaching in English
@5minutescode8 күн бұрын
Noted.
@supriyakumari74888 күн бұрын
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
@5minutescode8 күн бұрын
no idea about this
@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
@5minutescode8 күн бұрын
Sure, will continue in English.
@kartikkaushik47438 күн бұрын
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 ?
@5minutescode8 күн бұрын
arr.size max can be 10^3 only.
@newglobal20568 күн бұрын
Initially I used binary search but because of duplicate elements it gave me WA...
@5minutescode8 күн бұрын
yess. I hope it will be clear now.
@newglobal20568 күн бұрын
@@5minutescode Yes 🙏🧡
@shubhamgaming16418 күн бұрын
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; }
@newglobal20568 күн бұрын
@@shubhamgaming1641 yah!! Thanks bro 🙂 Btw array is already sorted no need to sort..
@newglobal20568 күн бұрын
Yah!! Thanks bro 🙂 Btw array is already sorted no need to sort explicitly..
@bijaypankaj72638 күн бұрын
Thanks Bro for explaining
@5minutescode8 күн бұрын
happy to help
@5minutescode8 күн бұрын
Guys please subscribe. Both Java and C++ code is added on my Github. Link in description. :)
@5minutescode8 күн бұрын
linkedin.openinapp.co/pk0r4 Guys show some love to my first LinkedIn post and do good comments. ❣❣❣