摘要:
一种不安全的写法 public class Main { public static final Object lock1 = new Object(); public static final Object lock2 = new Object(); public static void main 阅读全文
posted @ 2024-09-19 14:26
Duancf
阅读(32)
评论(0)
推荐(0)
摘要:
class Solution: def rand10(self): x = rand7() y = rand7() index = (x-1)*7 + y while index>40: x = rand7() y = rand7() index = (x-1)*7 + y return (inde 阅读全文
posted @ 2024-09-19 11:47
Duancf
阅读(22)
评论(0)
推荐(0)
摘要:
缺失的第一个正数 给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。 请你实现时间复杂度为 O(n) 并且只使用常数级别额外空间的解决方案。 class Solution: def firstMissingPositive(self, nums: List[int]) -> 阅读全文
posted @ 2024-09-19 11:28
Duancf
阅读(33)
评论(0)
推荐(0)

浙公网安备 33010602011771号