CodeNow - By Gopal Gupta
CodeNow - By Gopal Gupta
  • Видео 221
  • Просмотров 27 938
Find the Number of Possible Ways for an Event | Simple Maths| Briefly Explained | C++ | Biweekly 141
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks.
Problem Link:- leetcode.com/problems/find-the-number-of-possible-ways-for-an-event/
Submission Link:- leetcode.com/submissions/detail/1420088206/
Leetcode Profile:- leetcode.com/u/gupta_gopal/
Twitter:- gopal_gupta_
LinkedIn 75 Days Challenge:- www.linkedin.com/feed/update/urn:li:activity:7215094952416985088/
Просмотров: 155

Видео

3288. Length of the Longest Increasing Path | Step By Step Solution | Briefly Explained With Example
Просмотров 306Месяц назад
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem Link:- leetcode.com/problems/length-of-the-longest-increasing-path/ Submission Link:- leetcode.com/submissions/detail/1390007184/ Leetcode Profile:- leetcode.com/u/gupta_gopal/ Twitter:- gopal_gupt...
Time Taken to Mark All Nodes | Hindi | Rerooting DP | Briefly Explained | C++ | Biweekly 136
Просмотров 3042 месяца назад
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem Link:- leetcode.com/problems/time-taken-to-mark-all-nodes/description/ Submission Link:- leetcode.com/problems/time-taken-to-mark-all-nodes/submissions/1343204031/ Leetcode Profile:- leetcode.com/u/gupta_gopal...
Time Taken to Mark All Nodes | Rerooting DP | Explained With Examples | C++ | Leetcode Biweekly 136
Просмотров 5222 месяца назад
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem Link:- leetcode.com/problems/time-taken-to-mark-all-nodes/description/ Submission Link:- leetcode.com/problems/time-taken-to-mark-all-nodes/submissions/1343204031/ Leetcode Profile:- leetcode.com/u/gupta_gopal...
DP Solution | Minimum Number of Flips to Make Binary Grid Palindromic II | With Examples
Просмотров 1,1 тыс.2 месяца назад
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem Link:- leetcode.com/problems/minimum-number-of-flips-to-make-binary-grid-palindromic-ii/ Submission Link:- leetcode.com/contest/biweekly-contest-136/submissions/detail/1343142718/ Leetcode Profile:- leetcode.c...
The Celebrity Problem | Greedy | Simple Solution| O(N*N)| GFG | POTD 03-08-24
Просмотров 222 месяца назад
Here I am explaining to you all the solution to this GFG problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem Link:- www.geeksforgeeks.org/problems/the-celebrity-problem/1 Leetcode Profile:- leetcode.com/u/gupta_gopal/ Twitter:- gopal_gupta_ LinkedIn 75 Days Challenge:- www.linkedin.com/feed/update/urn:li:activ...
2976.Minimum Cost to Convert String I | Graph |Day22: Final 75- 1000 Days Streak Challenge| Leetcode
Просмотров 282 месяца назад
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem Link:- leetcode.com/problems/minimum-cost-to-convert-string-i/ Submission Link:- leetcode.com/submissions/detail/1335093429/ Leetcode Profile:- leetcode.com/u/gupta_gopal/ Twitter:- gopal_gupta_ Li...
Easiest Solution by AIR-11| Minimum Array Changes to Make Differences Equal| Explained with Example
Просмотров 1,6 тыс.3 месяца назад
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. LinkedIn AIR-11 Post:- www.linkedin.com/feed/update/urn:li:activity:7220468917322887168/ Problem Link:- leetcode.com/problems/minimum-array-changes-to-make-differences-equal/submissions/ Submission Link:-leetcode.com/...
3209. Number of Subarrays With AND Value of K | Binary Search | Day1: Final75 Challenge | Leetcode
Просмотров 413 месяца назад
Here I am explaining to you all the solution to this Leetcode problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks.
Vertical Width of a Binary Tree | With 2 Variables | Simple DFS Solution| O(N)| GFG | POTD 05-07-24
Просмотров 273 месяца назад
Here I am explaining to you all the solution to this GFG Daily problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem link:- www.geeksforgeeks.org/problems/vertical-width-of-a-binary-tree/1 Twitter Profile:- gopal_gupta_ Leetcode Profile:- leetcode.com/gupta_gopal/
Delete node in Doubly Linked List| With Visualization | O(x) | C++ | GFG | POTD 30-06-24
Просмотров 313 месяца назад
Here I am explaining to you all the solution to this GFG Daily problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem link:- www.geeksforgeeks.org/problems/delete-node-in-doubly-linked-list/1 Twitter Profile:- gopal_gupta_ Leetcode Profile:- leetcode.com/gupta_gopal/
The Palindrome Pattern | Simple "For" Loop Solution| O(N^2) | C++ | GFG | POTD 26-06-24
Просмотров 543 месяца назад
Here I am explaining to you all the solution to this GFG Daily problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem link:- www.geeksforgeeks.org/problems/the-palindrome-pattern3900/1 Twitter Profile:- gopal_gupta_ Leetcode Profile:- leetcode.com/gupta_gopal/
Summed Matrix | 1 Line solution with Proof | O(1) | C++ | GFG | POTD 24-06-24
Просмотров 854 месяца назад
Here I am explaining to you all the solution to this GFG Daily problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem link:- www.geeksforgeeks.org/problems/summed-matrix5834/1 Twitter Profile:- gopal_gupta_ Leetcode Profile:- leetcode.com/gupta_gopal/
Construct list using given q XOR queries | Simple Solution | O(Q) | C++ | GFG | POTD 02-06-24
Просмотров 414 месяца назад
Here I am explaining to you all the solution to this GFG Daily problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem link:- www.geeksforgeeks.org/problems/construct-list-using-given-q-xor-queries/1 Twitter Profile:- gopal_gupta_ Leetcode Profile:- leetcode.com/gupta_gopal/
Geek and its Game of Coins | Simple Traversal Solution | O(N) | C++ | GFG | POTD 29-05-24
Просмотров 3454 месяца назад
Here I am explaining to you all the solution to this GFG Daily problem. Here in my channel, I will upload many others coding problem solutions as well. So please Subscribe. Thanks. Problem link:- geeksforgeeks.org/problems/geek-and-its-game-of-coins4043/1 Twitter Profile:- gopal_gupta_ Leetcode Profile:- leetcode.com/gupta_gopal/
Longest subsequence-1 | Simple Traversal Solution | O(N) | C++ | GFG | POTD 27-05-24
Просмотров 284 месяца назад
Longest subsequence-1 | Simple Traversal Solution | O(N) | C | GFG | POTD 27-05-24
Minimum Cost To Make Two Strings Identical | LCS Solution | O(N*M) | C++ | GFG | POTD 26-05-24
Просмотров 164 месяца назад
Minimum Cost To Make Two Strings Identical | LCS Solution | O(N*M) | C | GFG | POTD 26-05-24
Diagonal sum in binary tree | Easiest Solution | O(N) Time Complexity | C++ | GFG | POTD 22-03-24
Просмотров 107 месяцев назад
Diagonal sum in binary tree | Easiest Solution | O(N) Time Complexity | C | GFG | POTD 22-03-24
Possible Paths in a Tree | Easiest DSU Solution | O(Q*N) Time Complexity | C++ | GFG | POTD 21-03-23
Просмотров 127 месяцев назад
Possible Paths in a Tree | Easiest DSU Solution | O(Q*N) Time Complexity | C | GFG | POTD 21-03-23
1835. Find XOR Sum of All Pairs Bitwise AND | Simple Bit Logic| Leetcode| Explained with Example|C++
Просмотров 137 месяцев назад
1835. Find XOR Sum of All Pairs Bitwise AND | Simple Bit Logic| Leetcode| Explained with Example|C
Water the plants | Easiest Solution | O(N) Time Complexity | C++ | GFG | POTD 18-01-23
Просмотров 99 месяцев назад
Water the plants | Easiest Solution | O(N) Time Complexity | C | GFG | POTD 18-01-23
Array Pair Sum Divisibility Problem | O(N) Time Complexity | C++ | GFG | POTD 01-01-23
Просмотров 59 месяцев назад
Array Pair Sum Divisibility Problem | O(N) Time Complexity | C | GFG | POTD 01-01-23
String's Count | O(1) Time Complexity | C++ | GFG | POTD 16-12-23
Просмотров 2010 месяцев назад
String's Count | O(1) Time Complexity | C | GFG | POTD 16-12-23
Shortest path from 1 to n | O(LogN) | C++ | GFG | POTD 30-11-23
Просмотров 3710 месяцев назад
Shortest path from 1 to n | O(LogN) | C | GFG | POTD 30-11-23
Reverse alternate nodes in Link List | Interview Approach | O(N) Time | Without Extra Memory|C++|GFG
Просмотров 67Год назад
Reverse alternate nodes in Link List | Interview Approach | O(N) Time | Without Extra Memory|C |GFG
Distinct Difference | O(NLogN) | C++ | GFG | POTD 19-03-23
Просмотров 15Год назад
Distinct Difference | O(NLogN) | C | GFG | POTD 19-03-23
Minimum Days | O(N) | C++ | GFG | POTD 11-02-23
Просмотров 18Год назад
Minimum Days | O(N) | C | GFG | POTD 11-02-23
Distinct Coloring | DP | C++ | GFG | POTD 01-02-23
Просмотров 33Год назад
Distinct Coloring | DP | C | GFG | POTD 01-02-23
Min operations | Bit Manipulation | C++ | GFG | POTD 29-01-22
Просмотров 32Год назад
Min operations | Bit Manipulation | C | GFG | POTD 29-01-22
Geeks And The String | Stack | O(N) Time | C++ | GFG | POTD 23-01-22
Просмотров 18Год назад
Geeks And The String | Stack | O(N) Time | C | GFG | POTD 23-01-22

Комментарии

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

    op bro. great !!

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

    thanks👍

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

    Great explanation man. Kudos for the solution. Keep helping others.🎉

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

      Glad you liked it 😀

  • @Aman-r7b
    @Aman-r7b 2 месяца назад

    Nice explanation sir , according to you what should be the rating of this problem ?

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

      This should be under Hard tag on Leetcode.

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

    Good approach Gopal !! Keep posting the contest solution . The part i liked most is how you described the intutuion , most people describe solution but very few describe its intution I am subscribing you .

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

      Glad you liked it😀.

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

    This explanation might not be entirely clear, so I have created a detailed tutorial in Hindi for better understanding. You can check it out here:- ruclips.net/video/6-52VV1doOc/видео.html

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

    No way this could be considered a medium problem hahaha. Thanks for sharing the solution to this problem!

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

      Glad you like it 😄.

  • @RichyRich18
    @RichyRich18 3 месяца назад

    bhaiya can you please try to write the logic more cleaner? like you can use write-pad-pen rather then mouse. and if possible it will be better if you explain in hindi bcz i face some difficulty. and will definately help your channel grow. otherwise all good.

    • @codenow6386
      @codenow6386 3 месяца назад

      I use english to improve my communication skills, ig I used only normal english but will try one in hindi as well, for now I will write approach as a text as well for better understanding as I don't have writepad :'

  • @anonymous10906
    @anonymous10906 3 месяца назад

    best explanation on utube!!

  • @belugacodes123
    @belugacodes123 3 месяца назад

    Love your channel! Keep growing. I am stuck on 1650 Rating, how to improve? (leetcode)

    • @satvikpandey700
      @satvikpandey700 3 месяца назад

      haha my rating is exactly 1650.

    • @belugacodes123
      @belugacodes123 3 месяца назад

      @@satvikpandey700 SAME!!!

    • @codenow6386
      @codenow6386 3 месяца назад

      You should focus on B/C problem difficulty level and try to upsolve atleast Till C of other contest, u will reach knight

  • @sunshineandrainbow5453
    @sunshineandrainbow5453 5 месяцев назад

    Thank you, simple and clean code 🖌️

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 8 месяцев назад

    NICE SUPER EXCELLENT MOTIVATED

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 8 месяцев назад

    NICE SUPER EXCELLENT MOTIVATED

  • @JerickMamuric
    @JerickMamuric 10 месяцев назад

    Thank you for this explanation sir : )

  • @smriti9703
    @smriti9703 Год назад

    Great Work!

  • @SP-bx3ql
    @SP-bx3ql Год назад

    nice explanation

  • @Login0p
    @Login0p Год назад

    thnx bro \

  • @satyajeetkumar5267
    @satyajeetkumar5267 Год назад

    Now this question has some extra test cases added, this program will fail when n and d both have value 1 and also you have not considered gcd ,it should be in the simplest form ,at last a and b should be divided by its gcd to get the simplest fraction.

  • @shivamdubey3798
    @shivamdubey3798 Год назад

    my side

  • @shivamdubey3798
    @shivamdubey3798 Год назад

    prog.cpp: In member function void Solution::dfs(Node*, int&, int&): prog.cpp:106:71: error: _gcd was not declared in this scope if(r->left && r->right) cur_gcd=_gcd(r->left->data,r->right->data); this compiler error

  • @shivamdubey3798
    @shivamdubey3798 Год назад

    if(r->left && r->right) cur_gcd=_gcd(r->left->data,r->right->data); this is error line no 106 how to resolve

    • @codenow6386
      @codenow6386 Год назад

      Use double _ before gcd, you are using just single _ , so getting error.

  • @shivamdubey3798
    @shivamdubey3798 Год назад

    Gcd was not delecared

  • @navamageshchandrasekar1217
    @navamageshchandrasekar1217 Год назад

    looking for code help could you share email id

    • @codenow6386
      @codenow6386 Год назад

      code is shown in the video already.

  • @shivamdubey3798
    @shivamdubey3798 Год назад

    You are great bro 👍👍👍

  • @rawat_ji5183
    @rawat_ji5183 2 года назад

    perfect explanation

  • @ViolaVisions
    @ViolaVisions 2 года назад

    d is the frequency of each element in the entire array?

    • @codenow6386
      @codenow6386 2 года назад

      D is count of different no. In my current subaaray from start to end

  • @saketkumar2521
    @saketkumar2521 2 года назад

    Thanks bro , I was stuck in this problem and your soln really helped me ......

  • @the.arty.heart_
    @the.arty.heart_ 2 года назад

    Best Solution!

  • @Sreekanth-Dev
    @Sreekanth-Dev 2 года назад

    Coding ninjas is better for data structures course sir

  • @ayushchauhan9261
    @ayushchauhan9261 2 года назад

    Thankyou

  • @siddheshb.kukade4685
    @siddheshb.kukade4685 2 года назад

    thank you for the video

  • @RahulKumar-wt9qc
    @RahulKumar-wt9qc 2 года назад

    Nice explanation bhaiya

  • @Sreekanth-Dev
    @Sreekanth-Dev 2 года назад

    Please help this code sir

  • @Sreekanth-Dev
    @Sreekanth-Dev 2 года назад

    Sir please share ur mail id i will share program pic i need program for that

  • @Sreekanth-Dev
    @Sreekanth-Dev 2 года назад

    Swap parity, good array programs solution want sir please share

    • @codenow6386
      @codenow6386 2 года назад

      Please provide link as I didn't find any such problem.

    • @Sreekanth-Dev
      @Sreekanth-Dev 2 года назад

      Please solve this code sir I need it

  • @the__developer
    @the__developer 2 года назад

    i watched this solution by many channel but i did not get but here i understood thanks bro!

  • @ShashankSingh-wr1yc
    @ShashankSingh-wr1yc 2 года назад

    Great explanation

  • @deepanshigupta9033
    @deepanshigupta9033 2 года назад

    Good Logic!!

  • @chinmaykulkarni8062
    @chinmaykulkarni8062 2 года назад

    I just saw this Channel. The Explanation was Awesome! Keep Growing !!!!

  • @anishbishnoi29xD
    @anishbishnoi29xD 2 года назад

    Good night bro 😊

  • @namamishawasthi
    @namamishawasthi 2 года назад

    How your solution is O(N)? I think, it is O(NlogN) because you are creating a set of N elements for finding distinct integers. Please clarify.

    • @codenow6386
      @codenow6386 2 года назад

      Ohh yeah! For 'Set' it's O(NlogN). And if we take unordered_set then it reduces to O(N). Thanks for reminding.

  • @kuldeep4331
    @kuldeep4331 2 года назад

    Hey bro 😎 can u please create a playlist of python 🐍

    • @codenow6386
      @codenow6386 2 года назад

      I will try to create it in future because as of now I don't have advanced knowledge of Python.

    • @kuldeep4331
      @kuldeep4331 2 года назад

      @@codenow6386 oh thanx man I appreciate your work and will be waiting for the python 🐍 series .

  • @akshaynegi4707
    @akshaynegi4707 2 года назад

    sir ,what if v[ ] = {2, 4,5} and X = 6 . then we wouldn't have got our answer .

  • @pawanlok1776
    @pawanlok1776 2 года назад

    thank for making tutorial it helps me a lot.

  • @gaggararevanthkumar5902
    @gaggararevanthkumar5902 2 года назад

    Sir can you explain in python too

    • @codenow6386
      @codenow6386 2 года назад

      Bro I don't have good command on python.

  • @AnkitRaj-my9ck
    @AnkitRaj-my9ck 2 года назад

    Hey it was a nice explanatory video Could you help me out with this coding solution it is currently giving WA ----------------------------------------------------------------------------------------------- vector<vector<int>> direction={{1,0},{0,1},{-1,0},{0,-1}}; int longestIncreasingPath(vector<vector<int>>& matrix) { // Code here if( matrix.size()==0) return 0; int n=matrix.size(),m=matrix[0].size(),longestPath=0; vector<vector<int>> cache(n,vector<int> (m,0)); for(int i=0;i<n;i++) { for(int j=0;j<m;j++) { int longest=recursiveFunction(matrix,cache,i,j); longestPath=max(longest,longestPath); } } return longestPath; } int recursiveFunction(vector<vector<int>>& matrix,vector<vector<int>>& cache, int i,int j) { if(cache[i][j]>0) return cache[i][j]; int n=matrix.size(),m=matrix[0].size(),size=0; for(int k=0;k<direction.size();k++) { int x=i+direction[k][0],y=j+direction[k][1]; if(x>-1&&y>-1&&x<n&&y<m&&matrix[i][j]<matrix[x][y]) { int longest=recursiveFunction(matrix,cache,x,y); size=max(size,longest); } } cache[i][j]=size+1; return cache[i][i]; }

  • @sagarahir2740
    @sagarahir2740 2 года назад

    very complicated solution. It is just an easy problem. just sort an array and if prev and current have the same parent then find the gcd of their child and get maximum. @CODEnow please check others solutions and explain so other students can quickly get them. This is just advice if you can please don't take it personally.

    • @codenow6386
      @codenow6386 2 года назад

      Bro same thing that you are saying , I did code and explain. Code may vary but approach is same as yours.

  • @vishaldasani8436
    @vishaldasani8436 2 года назад

    Please write in clear handwriting

    • @codenow6386
      @codenow6386 2 года назад

      Take care of it from next time.

  • @piyushkumawat5114
    @piyushkumawat5114 2 года назад

    But O(nlogn was expected) not to just pass all the given test cases

    • @codenow6386
      @codenow6386 2 года назад

      Yeah, I know that but this Time Complexity is possible with a segment tree that has a very complex code and my only point to make this video is to make the approach as easy as possible.

  • @ragul_manikandan
    @ragul_manikandan 2 года назад

    👍