Thought:
Originally intending to use the meta group one by one to find one by one,But timeout。
Then useintersectionFunction inO(1)
Solution at time complexity
Code:
1 | class Solution: |
My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.
{{ date }}
{{ time }}