1817. Find the number of users of users active
我的answer:
This question is mainlyHash tableKnowledge point,But we can usedefaultdict
Do,You can save a few lines of code。defaultdict
It can assume that existencekey
Initial value,So we only use directlyappend()
oradd()
Be。
这次和官方answer一模一样呢!
1 | class Solution: |