masked coder
masked coder
  • Видео 341
  • Просмотров 201 323
#242 | Square root of a number | gfg potd | 13-08-2024 | GFG Problem of The Day
🚀 Solving Geeks for Geeks Problem of the Day(POTD) in C++ | Square root of a number | Intuition Explained🧠
Problem Statement : www.geeksforgeeks.org/problems/square-root/1
Solution Code : github.com/Masked-coder11/gfg-POTD/blob/main/13.08.2024.cpp
----------------------------------------------------------------------------------------------------------
Linked List: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri
Binary Tree: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq
----------------------------------------------------------------------------------------------------------
🌐 Connect with Me:
GitHub: github.com/Masked-coder11
Instagram: garg.yugayu?igsh=MWZlcnR2bm90aW85Nw==
Linke...
Просмотров: 271

Видео

#240 | Job Sequencing Problem | gfg potd | 11-08-2024 | GFG Problem of The Day
Просмотров 849День назад
🚀 Solving Geeks for Geeks Problem of the Day(POTD) in C | Job Sequencing Problem | Intuition Explained🧠 Problem Statement : www.geeksforgeeks.org/problems/job-sequencing-problem-1587115620/1 Solution Code : github.com/Masked-coder11/gfg-POTD/blob/main/11.08.2024.cpp Linked List: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq 🌐 Conn...
L26. | Check for Children Sum Property | Binary Trees | Live Coding
Просмотров 10День назад
Hi All ! You can find rest other lectures of Binary Tree in the featured playlist Linked List Series: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree Series: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Problem Link: www.geeksforgeeks.org/problems/sum-tree/1 Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/check for children sum property 🌐 Connect with Me: G...
L25. | Maximum Width of Binary Tree | Binary Trees | Live Coding
Просмотров 10День назад
Hi All ! You can find rest other lectures of Binary Tree in the featured playlist Linked List Series: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree Series: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Problem Link: leetcode.com/problems/maximum-width-of-binary-tree/description/ Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/662 🌐 Connect with Me: GitHub:...
L24. | Root to Leaf node paths | Binary Trees | Live Coding
Просмотров 17День назад
Hi All ! You can find rest other lectures of Binary Tree in the featured playlist Linked List Series: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree Series: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Problem Link: leetcode.com/problems/binary-tree-paths/description/ Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/257 🌐 Connect with Me: GitHub: github.com...
#239 | Rotate a Linked List | gfg potd | 10-08-2024 | GFG Problem of The Day
Просмотров 230День назад
🚀 Solving Geeks for Geeks Problem of the Day(POTD) in C | Rotate a Linked List | Intuition Explained🧠 Problem Statement : www.geeksforgeeks.org/problems/rotate-a-linked-list/1 Solution Code : github.com/Masked-coder11/gfg-POTD/blob/main/10.08.2024.cpp Linked List: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq 🌐 Connect with Me: Gi...
L23. | Bottom View of Binary Tree | Binary Trees | Live Coding
Просмотров 6День назад
Hi All ! You can find rest other lectures of Binary Tree in the featured playlist Linked List Series: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree Series: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Problem Link: www.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1 Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/bottom view of a binary tree 🌐 Con...
L22. | Top View of Binary Tree | Binary Trees | Live Coding
Просмотров 5День назад
Hi All ! You can find rest other lectures of Binary Tree in the featured playlist Linked List Series: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree Series: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Problem Link: www.geeksforgeeks.org/problems/top-view-of-binary-tree/1 Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/top view of a binary tree 🌐 Connect w...
L21. | Vertical Order Traversal | Binary Trees | Live Coding
Просмотров 914 дней назад
Hi All ! You can find rest other lectures of Binary Tree in the featured playlist Linked List Series: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree Series: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Problem Link: leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/description/ Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/987 🌐 Connect wit...
Level 2A- Get started with HTML | Full Stack Development Course
Просмотров 1714 дней назад
Hope you are excited to learn If you are keen to learn DSA for Placements Following can be of help to you Codes- github.com/Masked-coder11/full-stack-dev/blob/main/2a Linked List- ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree- ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Stack- ruclips.net/p/PLkWk97X4k6wyMY0WF5las7YLCfrFetjad Leetcode Easy- ruclips.net/p/PLkWk97X4k6wx9tT_IfNO...
#238 | Maximize Array Value After Rearrangement | gfg potd | 09-08-2024 | GFG Problem of The Day
Просмотров 95414 дней назад
🚀 Solving Geeks for Geeks Problem of the Day(POTD) in C | Maximize Array Value After Rearrangement | Intuition Explained🧠 Problem Statement : www.geeksforgeeks.org/problems/maximize-arrii-of-an-array0026/1 Solution Code : github.com/Masked-coder11/gfg-POTD/blob/main/09.08.2024.cpp Linked List: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvb...
Level 1- All About Internet | Full Stack Development Course
Просмотров 3314 дней назад
Hope you are excited to learn If you are keen to learn DSA for Placements Following can be of help to you Linked List- ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree- ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Stack- ruclips.net/p/PLkWk97X4k6wyMY0WF5las7YLCfrFetjad Leetcode Easy- ruclips.net/p/PLkWk97X4k6wx9tT_IfNOrgAMnbBgY_CQp Leetcode Medium- ruclips.net/p/PLkWk97X4k6wzDK2...
#234 | Bottom View of Binary Tree | gfg potd | 05-08-2024 | GFG Problem of The Day
Просмотров 14914 дней назад
🚀 Solving Geeks for Geeks Problem of the Day(POTD) in C | Bottom View of Binary Tree | Intuition Explained🧠 Problem Statement : www.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1 Solution Code : github.com/Masked-coder11/gfg-POTD/blob/main/05.08.2024.cpp Linked List: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq 🌐 Connect...
L4.| Kth Smallest Element in an Array | Heaps | Live Coding
Просмотров 4014 дней назад
Hi guys Hope you all are excited to learn heaps Problem Link: www.geeksforgeeks.org/problems/kth-smallest-element5635/1 Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/kth smallest element Other resources you might find helpful: Linked List: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Stacks: ruclips.net/p/P...
L3.| Kth Largest Element in an Array | Heaps | Live Coding
Просмотров 1614 дней назад
Hi guys Hope you all are excited to learn heaps Problem Link: leetcode.com/problems/kth-largest-element-in-an-array/description/ Solution code: github.com/Masked-coder11/Leetcode-Problems/blob/main/215 Other resources you might find helpful: Linked List: ruclips.net/p/PLkWk97X4k6wwxPtbUZZqVDPYDqW62P2Ri Binary Tree: ruclips.net/p/PLkWk97X4k6wwupiQJ-mvlQTvbHQ17Hdmq Stacks: ruclips.net/p/PLkWk97X4...
L2.| Check if an Array represents a Heap | Heaps | Live Coding
Просмотров 2414 дней назад
L2.| Check if an Array represents a Heap | Heaps | Live Coding
#232 | The Celebrity Problem | gfg potd | 03-08-2024 | GFG Problem of The Day
Просмотров 12114 дней назад
#232 | The Celebrity Problem | gfg potd | 03-08-2024 | GFG Problem of The Day
Chapter 1- RoadMap for Full Stack Development | MERN STACK
Просмотров 3121 день назад
Chapter 1- RoadMap for Full Stack Development | MERN STACK
L1.| Introduction to Heaps and Priority Queues | Heaps
Просмотров 7028 дней назад
L1.| Introduction to Heaps and Priority Queues | Heaps
#224 | K-Pangrams | gfg potd | 26-07-2024 | GFG Problem of The Day
Просмотров 58828 дней назад
#224 | K-Pangrams | gfg potd | 26-07-2024 | GFG Problem of The Day
L20. | K Sum Paths in a binary tree | Binary Trees | Live Coding
Просмотров 1728 дней назад
L20. | K Sum Paths in a binary tree | Binary Trees | Live Coding
L19. | Kth Ancestor in a Tree | Binary Trees | Live Coding
Просмотров 2928 дней назад
L19. | Kth Ancestor in a Tree | Binary Trees | Live Coding
#223 | Array to BST | gfg potd | 25-07-2024 | GFG Problem of The Day
Просмотров 44028 дней назад
#223 | Array to BST | gfg potd | 25-07-2024 | GFG Problem of The Day
#222 | Check for BST | gfg potd | 24-07-2024 | GFG Problem of The Day
Просмотров 18128 дней назад
#222 | Check for BST | gfg potd | 24-07-2024 | GFG Problem of The Day
#221 | Merge two BST 's | gfg potd | 23-07-2024 | GFG Problem of The Day
Просмотров 267Месяц назад
#221 | Merge two BST 's | gfg potd | 23-07-2024 | GFG Problem of The Day
L18. | Lowest Common Ancestor of a Binary Tree | Binary Trees | Live Coding
Просмотров 32Месяц назад
L18. | Lowest Common Ancestor of a Binary Tree | Binary Trees | Live Coding
L17. | Diameter of Binary Tree | Binary Trees
Просмотров 23Месяц назад
L17. | Diameter of Binary Tree | Binary Trees
L16. | Construct Binary Tree from Preorder and Postorder Traversal | Made Easy
Просмотров 12Месяц назад
L16. | Construct Binary Tree from Preorder and Postorder Traversal | Made Easy
L15. | Construct Binary Tree from Inorder and Postorder Traversal | Made Easy
Просмотров 11Месяц назад
L15. | Construct Binary Tree from Inorder and Postorder Traversal | Made Easy
#219 | Maximum product subset of an array | gfg potd | 21-07-2024 | GFG Problem of The Day
Просмотров 290Месяц назад
#219 | Maximum product subset of an array | gfg potd | 21-07-2024 | GFG Problem of The Day

Комментарии

  • @harshvardhansingh4830
    @harshvardhansingh4830 8 дней назад

    bhaiya please comple heaps playlist as soon as possible ....please please please big bro

  • @user-pu9tv8to9m
    @user-pu9tv8to9m 12 дней назад

    Good Job dude. Keep it up

  • @rajanchauhan7196
    @rajanchauhan7196 14 дней назад

    can you made a separate video for this type of competitive programming concept ( like 1LL , 1e9+7 , ......)

  • @crekso398
    @crekso398 14 дней назад

    pls could u help me in java code .. some test cases are failing ... class Solution { int Maximize(int arr[]) { Arrays.sort(arr); long ans=0; for(int i=0;i<arr.length;i++){ ans+=(long)arr[i]*i; ans%=100000007; } return (int)ans; } }

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub 13 дней назад

      In mod value ig one zero is less

    • @crekso398
      @crekso398 13 дней назад

      @@maskedcoder-dy1ub tq so muchhhh .. it was a silly mistakee

  • @harsh7512
    @harsh7512 14 дней назад

    i have a doubt why have you used 1LL?

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub 14 дней назад

      To convert right hand side into long long to avoid overflowing

    • @rajanchauhan7196
      @rajanchauhan7196 14 дней назад

      @@maskedcoder-dy1ub can you made a separate video for this type of competitive programming concept

    • @AthrvChattopadhyay-mu8oh
      @AthrvChattopadhyay-mu8oh 13 дней назад

      yeah i also felt that plz make a seprate video.

  • @neettarget6507
    @neettarget6507 20 дней назад

    Great video brother !

  • @AshwaniSingh-v4l
    @AshwaniSingh-v4l 21 день назад

    😊 we are so excited 🥳🥳

  • @AC0_0
    @AC0_0 22 дня назад

    love ya ❤❤❤❤❤❤

  • @rishi2820
    @rishi2820 22 дня назад

    Woohoo🥳🥳

  • @LaxmanSingh-xw5xx
    @LaxmanSingh-xw5xx 26 дней назад

    Nice ❤

  • @ashwinbalaji26
    @ashwinbalaji26 28 дней назад

    My solution is also the same but I used vector instead of unordered_map since the latter can take O(n) time complexity in the worst case scenario

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub 28 дней назад

      Correct But it was working fine with it😅😅

    • @ashwinbalaji26
      @ashwinbalaji26 28 дней назад

      @@maskedcoder-dy1ub It worked for me as well. Using Unordered_map took 0.09s to run while vector took 0.02s. That's why I shared it😅

  • @jk-sm6qr
    @jk-sm6qr 28 дней назад

    Thank you Mask-man, you are back!!

  • @dave-ops
    @dave-ops 29 дней назад

    👍👍👍

  • @itsclickbait
    @itsclickbait 29 дней назад

    Thank you bro Helping me out in building consistency

  • @pritamkumarpattanayak1497
    @pritamkumarpattanayak1497 29 дней назад

    GFG POTD 25/07/2024 Node *buildBSTFromInorder(const vector<int> &inorder, int start, int end) { if (start > end) { return nullptr; } int mid = (start + end) / 2; Node *node = new Node(inorder[mid]); node->left = buildBSTFromInorder(inorder, start, mid - 1); node->right = buildBSTFromInorder(inorder, mid + 1, end); return node; } class Solution { public: Node* sortedArrayToBST(vector<int>& nums) { // Code here Node *root = buildBSTFromInorder(nums, 0, nums.size() - 1); return root; } };

  • @ashwinbalaji26
    @ashwinbalaji26 Месяц назад

    My solution is also same except I declared prev as class attribute and used same function. Code: class Solution { int prev = -1; public: bool isBST(Node* root) { if(!root) return true; bool left = isBST(root->left); if(!left) return false; if(root->data <= prev) return false; prev = root->data; bool right = isBST(root->right); return left && right; } };

  • @sauravchandra10
    @sauravchandra10 Месяц назад

    Can we do this without taking extra space to store the inorder traversal of root1 and root2?

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub 29 дней назад

      Tried it Couldn't find a way

    • @sauravchandra10
      @sauravchandra10 29 дней назад

      @@maskedcoder-dy1ub we can use the concept of merging 2 BST into 1 BST and then finding the inorder. We will first convert both the trees into sorted LL, merge these two sorted LLs into one sorted LL and then create a new tree using the merged list.

  • @vickyroy3595
    @vickyroy3595 Месяц назад

    missed your videos!!!

  • @manojitsaha6262
    @manojitsaha6262 Месяц назад

    Bro why 3rd test case fails when submitted??

  • @ashwinbalaji26
    @ashwinbalaji26 Месяц назад

    It's good to see you back bro. Hope you are doing good. By the way here is my solution: long long int findMaxProduct(vector<int>& arr) { // Write your code here int cnt=0,maxNeg=INT_MIN; long long ans = 1,mod = 1e9+7; for(int it:arr){ if(it < 0){ cnt++; maxNeg = max(maxNeg,it); } if(it != 0) ans = (ans*it)%mod; } if(arr.size() > 1 && (cnt & 1)) ans = ans/maxNeg; return ans; }

  • @pritamkumarpattanayak1497
    @pritamkumarpattanayak1497 Месяц назад

    you have linked in account ? if yes give me link

  • @swetayadav5344
    @swetayadav5344 Месяц назад

    I have been waiting for many long days ... finally it started again ..

  • @mantujaiswal9773
    @mantujaiswal9773 Месяц назад

    Bhai yr video q nai bana rhe ho itna din sa??

  • @harshvardhansingh4830
    @harshvardhansingh4830 Месяц назад

    when will you upload graphs , heaps , dp etc ? your videos are great and much appreciated. Thank you big brother

  • @Rajeevkumar-lm3qb
    @Rajeevkumar-lm3qb Месяц назад

    Great, keep doing ❤

  • @sameera5388-h5m
    @sameera5388-h5m Месяц назад

    Brow all okay? Hope you are doing well..as you have not posted from last 3 days

  • @rishi2820
    @rishi2820 Месяц назад

    thanks, one suggestion: please like use a better color to highlight the thing you're talking about, it was hard to know which 0 you were talking about in the matrix

  • @deepak-ly3ob
    @deepak-ly3ob Месяц назад

    Nice approach.

  • @user-zz4pi1bw7j
    @user-zz4pi1bw7j Месяц назад

    it is not that easy as it tag ...

  • @pumpkin2228
    @pumpkin2228 2 месяца назад

    u explain well but handwriting can be improved ☺☺

  • @ashwinbalaji26
    @ashwinbalaji26 2 месяца назад

    My other solution using regex: a,b,c,d = re.findall(r'[0-9]+',str) p,q = int(a),int(b) r,s = int(c),int(d) if p/q > r/s: return a+'/'+b elif r/s > p/q: return c+'/'+d return "equal"

  • @ashwinbalaji26
    @ashwinbalaji26 2 месяца назад

    My python code: def compareFrac (self, str): a,b = str.split(",") b = b.strip() p,q = map(int,a.split("/")) r,s = map(int,b.split("/")) if p/q > r/s: return a elif r/s > p/q: return b return "equal" I think the time complexity will remain the same as split() takes O(n)

  • @siddharthbhagat7637
    @siddharthbhagat7637 2 месяца назад

    Bro i did this without using any loop😂🤣 constant time complexity

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub 2 месяца назад

      Please send the code It would help others too

    • @trinitykhuman
      @trinitykhuman 2 месяца назад

      seriuosly ?

    • @sunitasunno
      @sunitasunno 2 месяца назад

      @@trinitykhuman why are you shock like this , it is possible by the use of the ( find or boost::split functions in the c++) oor may be the use of (trim and split function in other language ). DON'T BE ENTERTAIN ANYONE 👍👍

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub 2 месяца назад

      But time complexity of split function is O(N)

    • @trinitykhuman
      @trinitykhuman 2 месяца назад

      @@sunitasunno hey bro, it's not about the entertain. Please don't mind if I make you feel like it.

  • @ENagamani-yl1ub
    @ENagamani-yl1ub 2 месяца назад

    If this the case that is Str="abbccc" X=1,y=2 X+y=3 odd Is this crt??

  • @AC0_0
    @AC0_0 2 месяца назад

    ❤😊

  • @user-gu3xj5hw4h
    @user-gu3xj5hw4h 2 месяца назад

    sir jo aapne first brute force approach bataya hai uska TC O(n) hoga na ki O(n^2)?

  • @user-zz4pi1bw7j
    @user-zz4pi1bw7j 2 месяца назад

    bro formula for volume u calculated in here is different from which u implemented in the code , in the code u implemented volume=l^2 *(p/4)-(2*l); which i could n't find in here 5:40

  • @itsclickbait
    @itsclickbait 2 месяца назад

    Bhai how can we become like you😢

  • @Shiva_XD_
    @Shiva_XD_ 2 месяца назад

    Here is my code which is easy to Understand: double l = (p - sqrt((p * p) - (24 * a))) / 12; double ans = (l * l) * ((p / 4) - (2 * l)); return ans;

    • @user-vo3fr5qb6v
      @user-vo3fr5qb6v 2 месяца назад

      could you explain how we got this formula as the original formula explained in the video was AL/2 -PL^2/4+L^3

    • @Shiva_XD_
      @Shiva_XD_ 2 месяца назад

      @@user-vo3fr5qb6v simplifying equations

  • @sweabhishek
    @sweabhishek 2 месяца назад

    Bc problem toh chodo muze basic maths nahi samaz raha ab 🥲

  • @siddharthbhagat7637
    @siddharthbhagat7637 2 месяца назад

    Bro pls help it is getting stuck at 1110 test case I dont know whats the problem... // User function Template for Java class Solution { double maxVolume(double perimeter, double area) { // code here double h=(perimeter/2-Math.sqrt(perimeter*perimeter/4-6*area))/6; double v=h*area/2-h*h*perimeter/4+h*h*h; return v; } }

  • @entreprenuermind7453
    @entreprenuermind7453 2 месяца назад

    ans at 110 coming 1131004.73 but my output comes out to be 1131004.67

    • @Shiva_XD_
      @Shiva_XD_ 2 месяца назад

      same problem here, too got 1110 / 1115 Passed Testcases My Code: double l = (p - sqrt((p * p) - (24 * a))) / 12; double ans = (l * a * 0.5) - (l * l * p * 0.25) + pow(l, 3); return ans;

  • @raghavendrac4710
    @raghavendrac4710 2 месяца назад

    Thanks for the amazing explanation

  • @aizad786iqbal
    @aizad786iqbal 2 месяца назад

    also tried to code based on given volume formula but it was failing for big test case your code logic seems different ...

  • @aizad786iqbal
    @aizad786iqbal 2 месяца назад

    why are you caculating twice perimeter - (sqrt(pow(perimeter, 2) - (24 * area)))) / 12, Please try to upload cleaner code

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub 2 месяца назад

      You can create one variable and use it once as well No problem in that too

  • @AmanKumar-ux1ww
    @AmanKumar-ux1ww 2 месяца назад

    yeh math ka question tha ya coding ka