766. Toeplitz Matrix | Leetcode Hindi | Java

Sdílet
Vložit
  • čas přidán 30. 10. 2022
  • Hi folks! Comeback kar rhe h break ke baad let's go.
    Here we are solving766. Toeplitz Matrix
    || LeetcodeJava || O(M*N) time complexity || O(1) Space complexity
    Easy explanation in Hindi.
    Problem link: leetcode.com/problems/toeplit...
    If you have any queries reach out to me at
    linktr.ee/udyanojha

Komentáře • 14

  • @amanraheja2905
    @amanraheja2905 Před 5 měsíci +2

    Bhai, mai ekdum yahi so raha tha par aapne kitni asaani se bta diya. Well done 👍

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

      Awesome h ye toh Aman bhai… lessgo 🔥

  • @itsmesohit
    @itsmesohit Před rokem +2

    happy to see you again

  • @anishbishnoi29xD
    @anishbishnoi29xD Před rokem +3

    continue karo bhai series ab se 😃

    • @udyanishere
      @udyanishere  Před rokem

      Anish bhai! Connect me on Linkedin thoda time aur lagega regular aane me. Thank you so much for being here always.

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

      Hi! Anish. Started making videos, and kuch naya aane wala h.

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

      Mene bhi DSA band kr dia Tha Apne video dalni band ki thi tabse bhai. Ab wapis continue kr raha hu.

  • @ayanthisside
    @ayanthisside Před rokem +2

    Help a lot

  • @novicecoder5753
    @novicecoder5753 Před 9 měsíci +2

    Your approach is good but initially got below approach in my mind and implemented but after watching your solution it good
    class Solution {
    public static boolean checkToeplitz(int i, int j,int[][] matrix){
    while(i < matrix.length && j < matrix[0].length){
    if(matrix[i][j] != matrix[i-1][j-1]){
    return false;
    }
    i++;
    j++;
    }
    return true;
    }
    public boolean isToeplitzMatrix(int[][] matrix) {
    int n = matrix.length;
    int m = matrix[0].length;

    //My approach is first check the first row whether it is diagonally perfect then check first column whether it is diagonally perfect.


    //row checking
    int currentRow = 0;
    for(int i=0;i

  • @videokingdom6076
    @videokingdom6076 Před rokem

    this code is not working bro 😢😢