set operation str1-str2 on Strings
Set Theory operation on two strings
str1= apple
str2=pie
str1-str2 = (All elements of str1 which are not in str2)
Answer in above case = al
str1= apple
str2=pie
str1-str2 = (All elements of str1 which are not in str2)
Answer in above case = al
First we can sort the strings and once they are sorted, I think we can find an efficient way. Will publish my solution there in my blog and will provide the link.
ReplyDelete@Tanmay yes this can be one of the efficient way..:)
ReplyDelete