Barnali Bhowmik
Barnali Bhowmik
  • 31
  • 2 808
Find All Triplets with Zero Sum #shorts #youtubeshorts #leetcode #geeksforgeeks #coding #programming
Hello Fam,
Today I solved the question on "Finding Triplets which add up to ZERO".
I used nested loops concept as I'm a beginner.
Approach:
1. Declare the result vector to store triplets
2. Iterate through all triplets
3. We use 3 for loops. The innermost fixes the largest element and the outermost fixes the smallest element.
4. For 2nd for loop ensure j greater than i; 3rd for loop ensure k greater than j.
5. The check if the sum is ZERO in the if loop
6. Store indices and add to result
7. Return result
Overall, an interesting question.
✌🏻😊
#shorts #youtubeshorts #geeksforgeeks #leetcode #coding #programming #levelup #geeksforgeekspotd
Переглядів: 5

Відео

🔴 Count pairs with given sum #leetcode #geeksforgeeks #coding #programming #leetcodechallenge
Переглядів 59 годин тому
Hello Fam, 😄 Today I solved a question similar to yesterday that is "Counting pairs from array which sum up to the target number". However, this time we need the output in integer format rather than Boolean. SO, the code approach and all is same, but we use "HashMap" instead of "HashSet". Approach: 1) HashMap Usage - helps to keep track of the frequency of elements encountered so far, achieving...
🔴Let's crack the code for: Two Sum Pair with Given Sums #leetcode #geeksforgeeks #live
Переглядів 812 годин тому
Today's POTD was interesting... 😄At one point I thought maybe I figured it out but then got lost in the explanation. Need to work on it😐. For "Two Sum-Pair with Given Sum" we used Hashing Technique. This technique is used to check for the existence of a pair that sums to target. Why Hashing? 1. Constant Space: It avoids using nested loops 2. Direct Matching: It quickly stores and finds compleme...
🌟 Add two numbers #leetcode #geeksforgeeks #coding #programming
Переглядів 3714 годин тому
Hello Fam !! Here with yet another question on adding two numbers present in linked list. I have to say, the logic was very easy to understand. But it was hard to come up with the code (external help*). Approach: 1. Initialize the nodes 2. Traversing both the lists 3. Adding values from the current nodes 4. Compute carry and the value for the current node 5. Append the new node 6. Return the ne...
🌟 Missing Number #leetcode #geeksforgeeks #coding #programming
Переглядів 1019 годин тому
Evening Ya'll 😁 !! Solving another interesting qs on "Finding a missing number from the given array of range [0, n]". Platform: LeetCode Difficulty: Easy Problem List: 268 The approach I used here was the formula of sum of first n natural numbers. So, I took totalSum as sum of numbers in the range, and array sum. Then subtracted it to get the output (i.e., the mussing number in the array). 🍀 #y...
🌟 Search in Row wise Sorted Matrix #leetcode #geeksforgeeks #coding #developer
Переглядів 2221 годину тому
Hello 😊 Today I solved "Searching for a target element in Row-wise sorted matrix using Binary Search". Difficulty: Easy Platform: GeeksForGeeks Problem: GfG POTD Here, the question provided us a row-wise sorted matrix and asked to find a target element(x) in it. We firstly used "for loop", as the number of iterations were fixed (i.e., till the number of rows). Next, we use "binary search" as it...
🌟 Search a 2D Matrix #leetcode #developer #geeksforgeeks
Переглядів 1021 годину тому
Hello😎, Today I solved a question under "ARRAYS" Topic in Leetcode. Difficulty : Medium Array Qs : 74 Platform : LeetCode & GeeksforGeeks We also have the same question for POTD in GfG. Currently their #160DaysCoding Challenge is LIVE !!! Concept: For today's question, to efficiently search for the target element x in a matrix where each row and column is sorted in increasing order, we used the...
IITH || BVR SCIENT-ENTREPRENEURSHIP EVENT || Workshop,Food & Masti ||✌🏻😜#iit #college #youtubeshorts
Переглядів 12610 місяців тому
Final Day of BVR SCIENT event at IITH.. Hope to be back soon!!🕊️🌝 #youtubeshorts #youtube #india #jee #bts
Trip To IIT Hyderabad - (PART 1) ✨
Переглядів 68Рік тому
Trip To IIT Hyderabad - (PART 1) ✨
FRESHERS HO GAYA KYA !??📸🌟 | officially
Переглядів 80Рік тому
FRESHERS HO GAYA KYA !??📸🌟 | officially
FLASHMOB ka flashback 📸🌟
Переглядів 120Рік тому
FLASHMOB ka flashback 📸🌟
HACKATHON @VJIT | RESULTS | DID WE MAKE IT ?? | 🧐😶‍🌫️
Переглядів 119Рік тому
HACKATHON @VJIT | RESULTS | DID WE MAKE IT ?? | 🧐😶‍🌫️
FIRST EVER HACKATHON!!🥳
Переглядів 113Рік тому
FIRST EVER HACKATHON!!🥳
Day 1 @VJIT College 🪷
Переглядів 138Рік тому
Day 1 @VJIT College 🪷
A day out _ft Grandpa 💕
Переглядів 77Рік тому
A day out _ft Grandpa 💕
Trailer ~❤️
Переглядів 72Рік тому
Trailer ~❤️

КОМЕНТАРІ