- 博客(10)
- 收藏
- 关注
原创 Win11 修改host文件
以管理员身份打开记事本,再在记事本中打开host文件,就可以成功修改啦。目录,修改host文件属性,取消“只读”选项。
2023-04-14 15:38:13
1185
原创 PluginResolutionException: ... or one of its dependencies could not be resolved
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
2023-01-15 20:45:09
968
原创 【LeetCode刷题记录】剑指 Offer 09. 用两个栈实现队列
用两个栈实现一个队列。队列的声明如下,请实现它的两个函数 appendTail 和 deleteHead ,分别完成在队列尾部插入整数和在队列头部删除整数的功能。(若队列中没有元素,deleteHead 操作返回 -1 )示例:输入:["CQueue","deleteHead","appendTail","appendTail","deleteHead","deleteHead"][[],[],[5],[2],[],[]]输出:[null,-1,null,null,5,2]cla
2022-02-03 21:01:44
84
原创 【LeetCode刷题记录】剑指 Offer 53 - I. 在排序数组中查找数字 I(二分法)
统计一个数字在排序数组中出现的次数。输入: nums = [5,7,7,8,8,10], target = 8输出: 2class Solution(object): def search(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ def dic_high(low
2022-02-03 19:21:21
1204
原创 【LeetCode刷题记录】剑指 Offer 03. 数组中重复的数字
题目描述:找出数组中重复的数字。在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。示例:输入:[2, 3, 1, 0, 2, 5, 3]输出:2 或 3 垃圾的第一个解,时间复杂度为O(n²),超时了。。。class Solution(object): def findRepeatNumber(self, nums):
2022-01-29 18:03:11
415
原创 1/28/2022python学习记录
单行注释:#print('hello world')多行注释:'''print('hello world')'''ascii转字符:>>>chr(65)'A'字符转ascii:>>>ord('A')65print('%d %.3f' % (a, b)))多个字符中生成指定数量的随机字符:random.sample('zyxwvutsrqponmlkjihgfedcba',5)#返回的是列表's...
2022-01-28 22:25:12
1528
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人