Skip to content

Commit 2ea0fe6

Browse files
committed
Time: 372 ms (5.10%) | Memory: 19.7 MB (63.06%) - LeetSync
1 parent 0f64156 commit 2ea0fe6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution:
2+
def findRestaurant(self, list1: List[str], list2: List[str]) -> List[str]:
3+
d={}
4+
for i in range(len(list1)):
5+
for j in range(len(list2)):
6+
if list1[i] == list2[j]:
7+
d[list1[i]] = i+j
8+
lst=[]
9+
for i,j in d.items():
10+
if j== min(d.values()):
11+
lst.append(i)
12+
return lst

0 commit comments

Comments
 (0)