Mayur Programming Club
Mayur Programming Club
  • 269
  • 85 829
Solve LeetCode - 1380. Lucky Numbers in a Matrix - Java & C++ Solutions | July Challenge
🚀 Join our Daily LeetCode Challenge for July!
🔗 Problem & Solutions:
- LeetCode 1380 - Lucky Numbers in a Matrix: Dive deep into our comprehensive solutions in Java and C++.
- Problem Statement: [Link]
(leetcode.com/problems/lucky-numbers-in-a-matrix/description/?envType=daily-question&envId=2024-07-19)
- Code Walkthrough: [Leetcode Post]
(leetcode.com/problems/lucky-numbers-in-a-matrix/solutions/5498946/check-if-min-value-in-a-row-is-maximum-in-it-s-column-java-c-video-solution)
- Code Walkthrough: [GitHub Repository]
(github.com/AhlawatAbhishek/MayurProgrammingClub/blob/main/LeetCode%20solutions/1380.%20Lucky%20Numbers%20in%20a%20Matrix)
📊 Understand the Complexity:
- Input Size vs. Time Complexity: Learn how input size affects performance with detailed analysis. [Read More](www.geeksforgeeks.org/time-complexity-and-space-complexity/)
🛠️ Techniques and 🗂️📊🧩 Data Structures Used:
- Binary Tree: Master this data structure to solve problems faster. [Learn More] (www.geeksforgeeks.org/binary-tree-data-structure/)
- DFS: Master this technique to solve problems faster. [Learn More] (www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/)
-Post Order Traversal of Binary Tree:
Master this technique to solve problems faster. [Learn More] (www.geeksforgeeks.org/postorder-traversal-of-binary-tree/)
🌐 Stay Connected:
- Mayur Programming Club on LinkedIn: [Follow Us](www.linkedin.com/company/mayur-programming-club/)
- Connect with Me on LinkedIn: [Abhishek Ahlawat](www.linkedin.com/in/abhishek-ahlawat-667aa1178/)
📱 Explore Our Apps:
- Watch on CZcams: [Mayur App Studios](czcams.com/channels/NN6HwpdihR182gVoQ73Rxg.html) | Check out our apps available on the Google Play Store!
🎬 Discover how to tackle programming challenges effectively in our latest video!
zhlédnutí: 119

Video

Solve LeetCode - 1530. Number of Good Leaf Nodes Pairs - Java & C++ Solutions | July Challenge
zhlédnutí 438Před 4 hodinami
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1530 - Number of Good Leaf Nodes Pairs: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/number-of-good-leaf-nodes-pairs/?envType=daily-question&envId=2024-07-18) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/number-of-good-leaf-nodes-pairs/so...
Solve LeetCode - 1110. Delete Nodes And Return Forest - Java & C++ Solutions | July Challenge
zhlédnutí 244Před 7 hodinami
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1110 - Delete Nodes And Return Forest: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/delete-nodes-and-return-forest/description/?envType=daily-question&envId=2024-07-17) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/delete-nodes-and-return-...
Solve LeetCode - 2096. Step-By-Step Directions From a Binary Tree Node to Another
zhlédnutí 133Před 9 hodinami
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 2096. Step-By-Step Directions From a Binary Tree Node to Another: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/step-by-step-directions-from-a-binary-tree-node-to-another/description/?envType=daily-question&envId=2024-07-16) - Code Walkthrough: [Leetcod...
Solve LeetCode - 2196. Create Binary Tree From Descriptions - Java & C++ Solutions | July Challenge
zhlédnutí 207Před 12 hodinami
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 2196. Create Binary Tree From Descriptions: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/create-binary-tree-from-descriptions/description/?envType=daily-question&envId=2024-07-15) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/create-binary...
Solve LeetCode - 1717. Maximum Score From Removing Substrings - Java & C++ Solutions | July
zhlédnutí 365Před 19 hodinami
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1717 - Maximum Score From Removing Substrings: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/maximum-score-from-removing-substrings/description/?envType=daily-question&envId=2024-07-12) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/maximum-...
Solve LeetCode - 1190. Reverse Substrings Between Each Pair of Parentheses - Java & C++ Solutions
zhlédnutí 280Před 21 hodinou
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1190 - Reverse Substrings Between Each Pair of Parentheses: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses/description/?envType=daily-question&envId=2024-07-11) - Code Walkthrough: [Leetcode Post] (leet...
Solve LeetCode - 1598. Crawler Log Folder - Java & C++ Solutions | July Challenge
zhlédnutí 84Před dnem
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1598 - Crawler Log Folder: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/crawler-log-folder/description/?envType=daily-question&envId=2024-07-10) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/crawler-log-folder/solutions/5451633/simulation-...
Solve LeetCode - 1701. Average Waiting Time - Java & C++ Solutions | July Challenge
zhlédnutí 100Před dnem
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1701 - Average Waiting Time: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/average-waiting-time/description/?envType=daily-question&envId=2024-07-09) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/average-waiting-time/solutions/5444724/simul...
Solve LeetCode - 1823. Find the Winner of the Circular Game - Java & C++ Solutions | July Challenge
zhlédnutí 438Před dnem
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1823. - Find the Winner of the Circular Game: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/find-the-winner-of-the-circular-game/description/?envType=daily-question&envId=2024-07-08) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/find-the-wi...
Solve LeetCode - 2058. Find the Minimum and Maximum Number of Nodes Between Critical Points
zhlédnutí 143Před 14 dny
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 2058 - Find the Minimum and Maximum Number of Nodes Between Critical Points: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/description/?envType=daily-question&envId=2024-07-05) - Code ...
Solve LeetCode - 2181. Merge Nodes in Between Zeros - Java & C++ Solutions | July Challenge
zhlédnutí 132Před 14 dny
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 2181 - Merge Nodes in Between Zeros: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/merge-nodes-in-between-zeros/description/?envType=daily-question&envId=2024-07-04) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/merge-nodes-in-between-zeros...
Solve LeetCode - 1509. Minimum Difference Between Largest and Smallest Value in Three Moves
zhlédnutí 492Před 14 dny
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1509 - Minimum Difference Between Largest and Smallest Value in Three Moves: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/description/?envType=daily-question&envId=2024-07-03) - Code ...
Solve LeetCode - 350. Intersection of Two Arrays II - Java & C++ Solutions | July Challenge
zhlédnutí 150Před 14 dny
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 350 - Intersection of Two Arrays II: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/intersection-of-two-arrays-ii/description/?envType=daily-question&envId=2024-07-02) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/intersection-of-two-arrays-...
Solve LeetCode - 1550. Three Consecutive Odds- Java & C++ Solutions | July Challenge
zhlédnutí 140Před 14 dny
🚀 Join our Daily LeetCode Challenge for July! 🔗 Problem & Solutions: - LeetCode 1550 - Three Consecutive Odds: Dive deep into our comprehensive solutions in Java and C . - Problem Statement: [Link] (leetcode.com/problems/three-consecutive-odds/description/?envType=daily-question&envId=2024-07-01) - Code Walkthrough: [Leetcode Post] (leetcode.com/problems/three-consecutive-odds/solutions/5394582...
Solve LeetCode - 2285. Maximum Total Importance of Roads- Java & C++ Solutions | June Challenge
zhlédnutí 204Před 21 dnem
Solve LeetCode - 2285. Maximum Total Importance of Roads- Java & C Solutions | June Challenge
Solve LeetCode - 1791. Find Center of Star Graph - Java & C++ Solutions | June Challenge
zhlédnutí 208Před 21 dnem
Solve LeetCode - 1791. Find Center of Star Graph - Java & C Solutions | June Challenge
Solve LeetCode -1382. Balance a Binary Search Tree - Java & C++ Solutions | June Challenge
zhlédnutí 200Před 21 dnem
Solve LeetCode -1382. Balance a Binary Search Tree - Java & C Solutions | June Challenge
Solve LeetCode - Binary Search Tree to Greater Sum Tree - Java & C++ Solutions | June Challenge
zhlédnutí 122Před 21 dnem
Solve LeetCode - Binary Search Tree to Greater Sum Tree - Java & C Solutions | June Challenge
Solve LeetCode - Minimum Number of K Consecutive Bit Flips - Java & C++ Solutions | June Challenge
zhlédnutí 491Před 21 dnem
Solve LeetCode - Minimum Number of K Consecutive Bit Flips - Java & C Solutions | June Challenge
Solve LeetCode - 1052. Grumpy Bookstore Owner - Java & C++ Solutions | June Challenge
zhlédnutí 277Před 28 dny
Solve LeetCode - 1052. Grumpy Bookstore Owner - Java & C Solutions | June Challenge
Solve LeetCode - 1552. Magnetic Force Between Two Balls - Java & C++ Solutions | June Challenge
zhlédnutí 618Před měsícem
Solve LeetCode - 1552. Magnetic Force Between Two Balls - Java & C Solutions | June Challenge
Solve LeetCode - Minimum Number of Days to Make m Bouquets - Java & C++ Solutions | June Challenge
zhlédnutí 328Před měsícem
Solve LeetCode - Minimum Number of Days to Make m Bouquets - Java & C Solutions | June Challenge
Solve LeetCode 826. Most Profit Assigning Work - Java & C++ Solutions | June Challenge
zhlédnutí 215Před měsícem
Solve LeetCode 826. Most Profit Assigning Work - Java & C Solutions | June Challenge
Solve LeetCode 633: Sum of Square Numbers - Java & C++ Solutions | June Challenge
zhlédnutí 146Před měsícem
Solve LeetCode 633: Sum of Square Numbers - Java & C Solutions | June Challenge
945. Minimum Increment to Make Array Unique | June | Java | C++
zhlédnutí 223Před měsícem
945. Minimum Increment to Make Array Unique | June | Java | C
2037. Minimum Number of Moves to Seat Everyone | June | Java | C++
zhlédnutí 79Před měsícem
2037. Minimum Number of Moves to Seat Everyone | June | Java | C
75. Sort Colors | June | Java | C++
zhlédnutí 215Před měsícem
75. Sort Colors | June | Java | C
1122. Relative Sort Array | June | Java | C++
zhlédnutí 229Před měsícem
1122. Relative Sort Array | June | Java | C
1051. Height Checker | June | Java | C++
zhlédnutí 78Před měsícem
1051. Height Checker | June | Java | C

Komentáře

  • @sabarishkrishnamoorthi7985

    i am from leetcode solution page comment section, keep doing contents like this bro, thank you so much for your solution

  • @mayurprogrammingclub1001

    Hi Viewers, Apologies for the confusion. In the provided example, please consider 1 as a local minima. We hope this clarification does not affect your understanding of the logic and approach. Best regards, MPC (Mayur Programming Club) 🖥🔍

  • @missionimpossible5657

    Thanks bro, you are a life saver. Keep the videos coming!!!!!!!!!

  • @ntgrn-pr5yx
    @ntgrn-pr5yx Před 2 měsíci

    u can give better explain , explain without the code

  • @Prog-bo7vh
    @Prog-bo7vh Před 2 měsíci

    Wow. It was a great explanation. For the first 5 minutes I could not really follow you. Maybe think if you can become little bit clearer on the mask part and why you using it. Overall totally worth of 11 minutes. Thank you!

  • @Kaurs_Life
    @Kaurs_Life Před 2 měsíci

    Thanks a ton for the analogy!!

  • @OvhayKumar
    @OvhayKumar Před 3 měsíci

    sexy brooo

  • @dominicstocker5144
    @dominicstocker5144 Před 3 měsíci

    Thank you for your explanation. As a tip, your microphone seems to be clipping a lot. Maybe adjusting your microphone level and/or hoe close you are to it can help. Maybe it is caused by the microphone itself though.

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 3 měsíci

    There were some issues with the audio quality today. We regret the inconvenience caused. They will be fixed from the next video onwards.

  • @user-xf6bq5hl8n
    @user-xf6bq5hl8n Před 4 měsíci

    Keep up the great work

  • @hetjayeshbhaipatel1075
    @hetjayeshbhaipatel1075 Před 4 měsíci

    good

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 4 měsíci

    Around 4:05 Please consider division of overall product by each number(if divsion operator would have been allowed).

  • @samratpatel8060
    @samratpatel8060 Před 4 měsíci

    seen videos of 2-3 person but couldn't got the logic , you explained it so well. here's my like

  • @imdeveshshukla
    @imdeveshshukla Před 4 měsíci

    Thanks Bhai ab jaa kar samaj aaya

  • @KapilKumar-xz9ip
    @KapilKumar-xz9ip Před 4 měsíci

    thanks sir your videos are very helpful 🥰

  • @raveenakumari6724
    @raveenakumari6724 Před 4 měsíci

    could you please explain how you deleted the prefix sum values in hashmap?

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 4 měsíci

    Please note a correction in time complexity analysis. Consider it O(len1 + len2), where len1 and len2 are lengths of two input arrays.

  • @ISABELLEDUPONTTT
    @ISABELLEDUPONTTT Před 4 měsíci

    can u do python version pls

  • @rajivratna4813
    @rajivratna4813 Před 4 měsíci

    try in java also

  • @chase.2595
    @chase.2595 Před 4 měsíci

    how did u come up with this? like the thought process behind it

    • @mayurprogrammingclub1001
      @mayurprogrammingclub1001 Před 4 měsíci

      I used prior knowledge of XOR operations. And being able to apply some knowledge comes with practice. I have explained the thought process in video also.

  • @hussein-alemam
    @hussein-alemam Před 4 měsíci

    Thanks 🤍

  • @dharaneeshwarpurushothaman6396

    Thanks man 👍

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 5 měsíci

    There were some issues with audio quality today due to a technical glitch. They will be resolved in upcoming videos. We apologized for the inconvenience caused.

  • @cs_iitian
    @cs_iitian Před 5 měsíci

    Good Work, keep going. One Suggestion: try to upload in some faster speed.

  • @shirishakommu8133
    @shirishakommu8133 Před 5 měsíci

    Good work

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 5 měsíci

    Note : Consider 31st bit as the MSB(Most Significant Bit) in the illustration

  • @MaheshPatil-of1zy
    @MaheshPatil-of1zy Před 5 měsíci

    can you please tell me how to build logic for such code?

    • @mayurprogrammingclub1001
      @mayurprogrammingclub1001 Před 5 měsíci

      Sir, logic building improves with practice. It is the only way. Apart from that practicing smartly is the key. Let's say this was the problem that you were not able to solve own your own. Then what you can do is see what concepts are being used in solution and try to learn and practice them so that next time a similar pattern problems occurs your chances of solving it are more than what currently are.

  • @pushkarkhare9689
    @pushkarkhare9689 Před 6 měsíci

    Just a feedback: The explaination is good! what I wanted you to improve that if you are saying something and then taking time to write the same thing makes the video slow and boring which will make people disinterested. So maybe try avoiding or finding an alternate approach to it. Otherwise thanx for explaining:)

  • @user-xh2zc6lm3z
    @user-xh2zc6lm3z Před 6 měsíci

    Your approach is very satisfying 😄explaining every small chunk of code and concept associated with it is really helpful for a beginner like me Thanks!!

  • @nv2199
    @nv2199 Před 6 měsíci

    Keep up the good work.

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 6 měsíci

    Time complexity: O(n * log n), n is the number of unique player participating in matches. Space complexity: O(n)

  • @marilahmadsurat3078
    @marilahmadsurat3078 Před 6 měsíci

    Masya Alloh 👍🏻

  • @asiandude918
    @asiandude918 Před 6 měsíci

    14:55 If I'm understanding this correctly, the condition in line 13 is checking if indx is an index outside of the current available indices in the vector lis. Meaning len is the same as lis.end() which will always be increasing the subsequence? EDIT: I replaced line 13 with this "if (lower_bound(lis.begin(), lis.end(), num) == lis.end())" and it seemed to work the same, so I believe my reasoning is correct. Thank you for the solution.

  • @aryanmalik919
    @aryanmalik919 Před 6 měsíci

    A great solution and a great explanation absolutely loved it

  • @pranavsharma7479
    @pranavsharma7479 Před 6 měsíci

    freq = 10 , freq = 9 how ans is 7??

    • @mayurprogrammingclub1001
      @mayurprogrammingclub1001 Před 6 měsíci

      Write some printing statements in the loop at different places and have a run of solution, then you will be able to observe the pattern.

  • @__anonymous__.123
    @__anonymous__.123 Před 6 měsíci

    bro, you are not confident with your explanation.

  • @NikhilsNest
    @NikhilsNest Před 6 měsíci

    Thanks buddy, this question wasted my entire day. Your logic is simple.

  • @barryi4420
    @barryi4420 Před 7 měsíci

    🎉 Promo sm

  • @RohitKumar-lf5ly
    @RohitKumar-lf5ly Před 8 měsíci

    Bro aaj vala kiya kya ?

    • @mayurprogrammingclub1001
      @mayurprogrammingclub1001 Před 8 měsíci

      Sir, due to some other commitments we are not able to make content on Satudary's and Sundays's as of now. Meanwhile you may check our video solution of today's leetcode challenge. Thanks for being a valued subscriber.

  • @ashishkumarsingh6618
    @ashishkumarsingh6618 Před 9 měsíci

    Nice Explanation

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 9 měsíci

    Correction of Complexities in the video explanation: Time Complexity: O(N) where N is the number of nodes in the binary tree. Auxiliary Space: O(N) where N is the number of nodes in the binary tree.

  • @r.k.j4546
    @r.k.j4546 Před 9 měsíci

    In which year you are ?

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 9 měsíci

    class Solution { public: int minimumTime(int n, vector<vector<int>>& rel, vector<int>& time) { //first you will be making up a graph to show the relation between different courses unordered_map<int, vector<int>> graph; //this data structure will help you to find the zero dependency courses and relax them while doing topological sort vector<int>deg(time.size()+1, 0); //this queue will be used to do BFS of relations in topological sort queue<int> que; //forming the graph from the given realtion array and degree vector to calculate number of dependencies for(auto &r : rel){ int prev = r[0], curr = r[1]; deg[curr]++; graph[prev].push_back(curr); } //this data structure will be used to find the minimum time it will require for say 'i'th course to be completed vector<int> dist(time.size() + 1, 0); int tTime = 0; //enqueing zero dependency courses first for(int vert = 1; vert<deg.size(); vert++){ int d = deg[vert]; if(d == 0){ que.push(vert); dist[vert] = time[vert-1]; } } // then for each of the zero dependency course in the queue you will be relaxing the neighbours of that course i.e. the courses dependent on the current course being explored for it's neighbours, as soon as course reaches zero dependecy you will enqueue it into the queue while(!que.empty()){ int size = que.size(); while(size -- > 0){ int vert = que.front(); que.pop(); for(auto neigh : graph[vert]){ //updating the time required to finish each course along with relaxation dist[neigh] = max(dist[neigh], time[neigh-1] + dist[vert]); if(--deg[neigh] == 0)que.push(neigh); } } } //maximum time taking course's time will be returned return *max_element(dist.begin(), dist.end()); } };

  • @abhinavahlawat5333
    @abhinavahlawat5333 Před 9 měsíci

    Explanation is great

  • @abhinavahlawat5333
    @abhinavahlawat5333 Před 9 měsíci

    Great work

  • @abhinavahlawat5333
    @abhinavahlawat5333 Před 9 měsíci

    Great work

  • @abhinavahlawat5333
    @abhinavahlawat5333 Před 9 měsíci

    Good explanation

  • @mayurprogrammingclub1001
    @mayurprogrammingclub1001 Před 9 měsíci

    Top floor can be reached from last second or last floor by taking 2 or 1 steps respectively. That's is the logic that we missed while returning answer when we tried submitting for the first few times.

  • @abhinavahlawat5333
    @abhinavahlawat5333 Před 9 měsíci

    Great work