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 Жыл бұрын
Thanks dii..nice explanation
@techadorabynivedita
Жыл бұрын
Welcome :) keep learning
@aakashgoswami2356 Жыл бұрын
Bhot hee pyara explain kiya aapne.Thankyou
@techadorabynivedita
Жыл бұрын
Thank You :)
@mohamedhesham6008 Жыл бұрын
very nice and simple solution thank you
@techadorabynivedita
Жыл бұрын
You are welcome
@champu5645 Жыл бұрын
Very very nice explaination
@techadorabynivedita
Жыл бұрын
Thanks for liking
@sarcastic55615 ай бұрын
what's the intitution behind it why you choosen to solve like this ??? can u plz give me the idea
@Abhishekkumar-im7lb Жыл бұрын
How did you got the intution to solve the problem in that way.
@pranavM40 Жыл бұрын
Well explained in simple way
@techadorabynivedita
Жыл бұрын
Thank You :)
@MR-re8pq Жыл бұрын
Its time complexity is O((m+n)×n)
@codecraft26 Жыл бұрын
well explained
@techadorabynivedita
Жыл бұрын
Thank You :)
@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 Жыл бұрын
LCS ?
@techadorabynivedita
Жыл бұрын
I have used sliding window technique
@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
Пікірлер: 19
Thanks dii..nice explanation
@techadorabynivedita
Жыл бұрын
Welcome :) keep learning
Bhot hee pyara explain kiya aapne.Thankyou
@techadorabynivedita
Жыл бұрын
Thank You :)
very nice and simple solution thank you
@techadorabynivedita
Жыл бұрын
You are welcome
Very very nice explaination
@techadorabynivedita
Жыл бұрын
Thanks for liking
what's the intitution behind it why you choosen to solve like this ??? can u plz give me the idea
How did you got the intution to solve the problem in that way.
Well explained in simple way
@techadorabynivedita
Жыл бұрын
Thank You :)
Its time complexity is O((m+n)×n)
well explained
@techadorabynivedita
Жыл бұрын
Thank You :)
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
LCS ?
@techadorabynivedita
Жыл бұрын
I have used sliding window technique
@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