718. Maximum Length of Repeated Subarray || Sliding Window || TC:o(mn) SC: o(1)

PROBLEM LINK : leetcode.com/problems/maximum...
SOLUTION LINK : github.com/niveditaprity/Leet...
#dsa #leetcode #dailychallenge #datastructures #algorithms

Пікірлер: 19

  • @gitanjalikumari9262
    @gitanjalikumari9262 Жыл бұрын

    Thanks dii..nice explanation

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Welcome :) keep learning

  • @aakashgoswami2356
    @aakashgoswami2356 Жыл бұрын

    Bhot hee pyara explain kiya aapne.Thankyou

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank You :)

  • @mohamedhesham6008
    @mohamedhesham6008 Жыл бұрын

    very nice and simple solution thank you

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    You are welcome

  • @champu5645
    @champu5645 Жыл бұрын

    Very very nice explaination

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thanks for liking

  • @sarcastic5561
    @sarcastic55615 ай бұрын

    what's the intitution behind it why you choosen to solve like this ??? can u plz give me the idea

  • @Abhishekkumar-im7lb
    @Abhishekkumar-im7lb Жыл бұрын

    How did you got the intution to solve the problem in that way.

  • @pranavM40
    @pranavM40 Жыл бұрын

    Well explained in simple way

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank You :)

  • @MR-re8pq
    @MR-re8pq Жыл бұрын

    Its time complexity is O((m+n)×n)

  • @codecraft26
    @codecraft26 Жыл бұрын

    well explained

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank You :)

  • @kakshaye2997
    @kakshaye2997 Жыл бұрын

    Thanks Another simple solution in Java public static int findLength(int[] nums1, int[] nums2) { int res = 0; int count=0; for (int i = 0; i for (int j = 0; j count=0; if (nums1[i] == nums2[j]) { int k = i; int l = j; while(k

  • @JangBahadur3028
    @JangBahadur3028 Жыл бұрын

    LCS ?

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    I have used sliding window technique

  • @shubhambaranwal8962

    @shubhambaranwal8962

    Жыл бұрын

    that will have SC of o(mn) and even if u try to optimize it, it will come down to 2n or 2m, which ever u take, her solution is based on o(1) SC