1 class Solution: 2 def isPalindrome(self,s): 3 n = len(s) 4 i,j = 0,n-1 5 while i < j: 6 if s[i] != s[j]: 7 return False 8 i += 1 9 j -= 1 10 return ...
分类:
其他好文 时间:
2020-01-26 14:37:25
阅读次数:
81
本题是写新的数据结构的题,跟155 最小栈相近 本题看答案很精妙,我没有想到直接继承父类 OrderedDict 直接就有顺序了 不需要我额外再另外再设一个Dict记录时间了 那这样我想到的: 我们可以直接继承Dict, 记录顺序可以添加一个self.time 然后取self.time最小的值,可以 ...
分类:
其他好文 时间:
2020-01-26 14:29:18
阅读次数:
65
题目: 数轴上放置了一些筹码,每个筹码的位置存在数组 chips 当中。 你可以对 任何筹码 执行下面两种操作之一(不限操作次数,0 次也可以): 将第 i 个筹码向左或者右移动 2 个单位,代价为 0。将第 i 个筹码向左或者右移动 1 个单位,代价为 1。最开始的时候,同一位置上也可能放着两个或 ...
分类:
其他好文 时间:
2020-01-25 22:16:34
阅读次数:
107
01. 终端命令格式 command [-options] [parameter] 说明: command:命令名,相应功能的英文单词或单词的缩写 [-options]:选项,可用来对命令进行控制,也可以省略 parameter:传给命令的参数,可以是 零个、一个 或者 多个 [] 代表可选 02. ...
分类:
系统相关 时间:
2020-01-25 16:43:24
阅读次数:
100
参考:https://jingyan.baidu.com/article/495ba841d4200438b20ede53.html 环境: windows10 1. 安装 Python https://www.python.org/ 2. selenium安装: pip install selen ...
分类:
编程语言 时间:
2020-01-24 20:07:51
阅读次数:
78
hive导出到本地数据报错 Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to move source hdfs://localhost:9000/tmp/hive/daisy/ ...
分类:
其他好文 时间:
2020-01-24 15:50:13
阅读次数:
201
// eslint exercise 4 (no-console) // When you're finished with this exercise, run // "npm start exercise.eslint.5" // to move on to the next exercise ...
分类:
其他好文 时间:
2020-01-23 22:36:43
阅读次数:
87
// eslint exercise 1 (no-console) // When you're finished with this exercise, run // "npm start exercise.eslint.2" // to move on to the next exercise ...
分类:
其他好文 时间:
2020-01-23 21:18:20
阅读次数:
104
``` '; //var_dump($numbers); //var_dump($odds); //var_dump($letters); $a[3]=4; //automatically resize the array //4 $student = ['amy','joseph','mike']... ...
分类:
Web程序 时间:
2020-01-23 19:46:55
阅读次数:
111
``` C盘存在大量cbs.log文件,磁盘挤爆 Stop the Windows Modules Installer (TrustedInstaller) service Delete or move the large Cbspersist_XX.log file out of \Windows... ...
分类:
其他好文 时间:
2020-01-23 18:28:07
阅读次数:
122