1071. Greatest Common Divisor of Strings

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Thank you di. I got my first leetcode badge .

prathmesh_Bidve
Автор

first video of yours i watched, liked it 👍🏻

piyushx
Автор

Great, now everything is clear .. what is the question and approach to solve it .

sumit_verma_
Автор

Teaching is actually learning.. all the best for your future'

nothinginsideme
Автор

hey nivedita, It's a very wonderful video
I just have one doubt that I am confused whether to start DP first or should I cover Greedy before DP ??

vaidanshkukreja
Автор

I have solved it already,
But came watch Great explanation!

hameedmulani
Автор

didi please make a video on gfg question : Maximum of minimum for every window size
I am not able to understand this and there is noone you can explain it with easiness like you do

MrHero-rlcl
Автор

the answer we get for input s1=aaa, is "aaa" from the code you gave. But actual answer is "a". Then how this can be solved? Please ignore if I'm wrong.

balasankar
Автор

I have covered all the main topics of dsa and i am facing problem in recursion maam can you guide me how to hold good that topic?

amanamanchhabra
Автор

this java code is not working please someone help class Solution {
public String gcdOfStrings(String str1, String str2) {
int n1 = str1.length();
int n2 = str2.length();
int n3 = gcd(n1, n2);

if(str1+str2 != str2+str1){
return "";
}
return str1.substring(0, n3);
}
public static int gcd(int n1, int n2){
while(n1%n2!=0){
int rem = n1%n2;
n1 = n2;
n2 = rem;
}
return n2;
}
}

codecreww
Автор

do not read code instead explain, ,,why it is that if(str1+str2!=str2+str1) than no string is possible!!!

ARYAN-mgrr