avatar
Siz Long

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/.

  • Resume
  • Archives
  • Categories
  • Photos
  • Music



{{ date }}

{{ time }}

avatar
Siz Long

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/.

  • 主页
  • Resume
  • Archives
  • Categories
  • Photos
  • Music

6300. Minimum public value

  2024-01-01        
字数统计: 56字   |   阅读时长: 1min

2023-01-22 (2).png
6300. Minimum public value

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
2
3
4
5
6
class Solution:
def getCommon(self, nums1: List[int], nums2: List[int]) -> int:
common = set(nums1).intersection(nums2)
if common:
return min(common)
return -1
  • Python
  • answer

扫一扫,分享到微信

微信分享二维码
6323. Child that divides money the most
6324. Maximize the great value of the array
目录
  1. 1. Thought:
  2. 2. Code:

153 篇 | 133k
次 | 人
这里自动载入天数这里自动载入时分秒
2022-2025 loong loong | 新南威尔士龙龙号