Skip to content

Commit fd9c6a4

Browse files
author
Khanh Do
committed
Move statement outside of inner loop
1 parent 0d56fdc commit fd9c6a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1452-people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def people_indexes(favorite_companies):
1111
elim_indexes = set()
1212

1313
for i in range(n):
14+
u = set(favorite_companies[i])
1415
for j in range(i+1, n):
15-
u = set(favorite_companies[i])
1616
v = set(favorite_companies[j])
1717
if u.issubset(v):
1818
elim_indexes.add(i)

0 commit comments

Comments
 (0)