Skip to content

Commit 1aeee80

Browse files
committed
Runtime: 55 ms (Top 37.91%) | Memory: 13.8 MB (Top 61.66%)
1 parent 12ce618 commit 1aeee80

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# Runtime: 55 ms (Top 37.91%) | Memory: 13.8 MB (Top 61.66%)
12
class Solution:
23
def numDifferentIntegers(self, word: str) -> int:
3-
4+
45
word = re.findall('(\d+)', word)
56
numbers = [int(i) for i in word]
6-
7-
return len(set(numbers))
7+
8+
return len(set(numbers))

0 commit comments

Comments
 (0)