摘要: 给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。 进阶:你可以实现时间复杂度为 O(n) 并且只使用常数级别额外空间的解决方案吗? 示例1:输入:nums = [1,2,0]输出:3 示例2:输入:nums = [3,4,-1,1]输出:2 示例3:输入:nums = [7 阅读全文
posted @ 2021-02-04 15:05 336699强强 阅读(84) 评论(0) 推荐(0) 编辑
摘要: >>> d= ['ewf','2'] >>> if d[1]%2 ==0: print('defe') Traceback (most recent call last): File "<pyshell#20>", line 1, in <module> if d[1]%2 ==0: TypeErr 阅读全文
posted @ 2021-02-04 15:02 336699强强 阅读(1611) 评论(0) 推荐(0) 编辑
摘要: >>> a = [] >>> a[0] = 'dsfew' Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> a[0] = 'dsfew' IndexError: list assignment in 阅读全文
posted @ 2021-02-04 14:59 336699强强 阅读(640) 评论(0) 推荐(0) 编辑