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