Odd String Difference | leetcode biweekly 90 | Leetcode Easy

preview_player
Показать описание
Here in this video we will be discussing the approach to solve " Odd String Difference " of leetcode biweekly 90 in hindi.
Рекомендации по теме
Комментарии
Автор

code:
diff=[]
for i in words:
j=1
temp_diff=[]
while(j<len(i)):


j+=1

diff.append(temp_diff)
if (len(diff)==3 and diff[0]==diff[1] and diff[0] !=diff[2] ):
return words[2]
elif ( len(diff)==3 and diff[0]==diff[2] and diff[0] !=diff[1] ):
return words[1]
elif (len(diff)==3 and diff[1]==diff[2] and diff[1] !=diff[0] ):
return words[0]
if (len(diff)>3):
if temp_diff not in diff[:len(diff)-1]:
return i

ziddicoder
visit shbcf.ru