CodeNow - By Gopal Gupta
CodeNow - By Gopal Gupta
  • 220
  • 27 218
3288. Length of the Longest Increasing Path | Step By Step Solution | Briefly Explained With Example
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_gupta_
LinkedIn 75 Days Challenge:- www.linkedin.com/feed/update/urn:li:activity:7215094952416985088/
มุมมอง: 170

วีดีโอ

Time Taken to Mark All Nodes | Hindi | Rerooting DP | Briefly Explained | C++ | Biweekly 136
มุมมอง 257หลายเดือนก่อน
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
มุมมอง 460หลายเดือนก่อน
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.1Kหลายเดือนก่อน
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
มุมมอง 20หลายเดือนก่อน
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
มุมมอง 28หลายเดือนก่อน
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.6Kหลายเดือนก่อน
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
มุมมอง 402 หลายเดือนก่อน
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
มุมมอง 262 หลายเดือนก่อน
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
มุมมอง 272 หลายเดือนก่อน
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
มุมมอง 542 หลายเดือนก่อน
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
มุมมอง 852 หลายเดือนก่อน
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
มุมมอง 413 หลายเดือนก่อน
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
มุมมอง 3413 หลายเดือนก่อน
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
มุมมอง 283 หลายเดือนก่อน
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/longest-subsequence-such-that-difference-between-adjacents-is-one4724/1 Twitter Profile:- gopal_gupta_ Leetcode Profile:- leetcode.com/gupta_gopal/
Minimum Cost To Make Two Strings Identical | LCS Solution | O(N*M) | C++ | GFG | POTD 26-05-24
มุมมอง 163 หลายเดือนก่อน
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
มุมมอง 105 หลายเดือนก่อน
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
มุมมอง 125 หลายเดือนก่อน
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++
มุมมอง 136 หลายเดือนก่อน
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
มุมมอง 87 หลายเดือนก่อน
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
มุมมอง 58 หลายเดือนก่อน
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
มุมมอง 209 หลายเดือนก่อน
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
มุมมอง 359 หลายเดือนก่อน
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
มุมมอง 6611 หลายเดือนก่อน
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
Find the first node of loop in linked list | With Mathematical Proof| C++ | GFG | POTD 18-01-22
มุมมอง 15ปีที่แล้ว
Find the first node of loop in linked list | With Mathematical Proof| C | GFG | POTD 18-01-22

ความคิดเห็น

  • @ruthvik1726
    @ruthvik1726 4 วันที่ผ่านมา

    op bro. great !!

  • @shraddhakamble6831
    @shraddhakamble6831 หลายเดือนก่อน

    thanks👍

  • @amitguptapc
    @amitguptapc หลายเดือนก่อน

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

    • @codenow6386
      @codenow6386 หลายเดือนก่อน

      Glad you liked it 😀

  • @Aman-r7b
    @Aman-r7b หลายเดือนก่อน

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

    • @codenow6386
      @codenow6386 หลายเดือนก่อน

      This should be under Hard tag on Leetcode.

  • @abhishekshukla5747
    @abhishekshukla5747 หลายเดือนก่อน

    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 หลายเดือนก่อน

      Glad you liked it😀.

  • @codenow6386
    @codenow6386 หลายเดือนก่อน

    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:- th-cam.com/video/6-52VV1doOc/w-d-xo.html

  • @luizfelipe2330
    @luizfelipe2330 หลายเดือนก่อน

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

    • @codenow6386
      @codenow6386 หลายเดือนก่อน

      Glad you like it 😄.

  • @RichyRich18
    @RichyRich18 หลายเดือนก่อน

    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 หลายเดือนก่อน

      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 หลายเดือนก่อน

    best explanation on utube!!

    • @codenow6386
      @codenow6386 หลายเดือนก่อน

      Thanks

  • @kareempatel8250
    @kareempatel8250 หลายเดือนก่อน

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

    • @satvikpandey700
      @satvikpandey700 หลายเดือนก่อน

      haha my rating is exactly 1650.

    • @kareempatel8250
      @kareempatel8250 หลายเดือนก่อน

      @@satvikpandey700 SAME!!!

    • @codenow6386
      @codenow6386 หลายเดือนก่อน

      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 4 หลายเดือนก่อน

    Thank you, simple and clean code 🖌️

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 6 หลายเดือนก่อน

    NICE SUPER EXCELLENT MOTIVATED

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 6 หลายเดือนก่อน

    NICE SUPER EXCELLENT MOTIVATED

  • @user-of5fb6nb9e
    @user-of5fb6nb9e 9 หลายเดือนก่อน

    Thank you for this explanation sir : )

  • @smriti9703
    @smriti9703 11 หลายเดือนก่อน

    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 ปีที่แล้ว

    perfect explanation

  • @ViolaVisions
    @ViolaVisions ปีที่แล้ว

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

    • @codenow6386
      @codenow6386 ปีที่แล้ว

      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.

    • @codenow6386
      @codenow6386 2 ปีที่แล้ว

      Glad, this helps you.

  • @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 ปีที่แล้ว

    👍