Legends Never Die.
121. 买卖股票的最佳时机 121. 买卖股票的最佳时机
#!/usr/bin/env python # -*- coding:utf-8 -*- # 重要题 # 双指针思路,左指针为买入价,右指针为卖出价 # 右指针向右移动找最高卖出价,动态更改最大收益 # 当遇到比左指针还低的价格时,左指针收
2018-01-01
7. 整数反转 7. 整数反转
#!/usr/bin/env python # -*- coding:utf-8 -*- class Solution: def reverse(self, x: int) -> int: s=str(x)
2017-12-02
9. 回文数 9. 回文数
#!/usr/bin/env python # -*- coding:utf-8 -*- class Solution: def isPalindrome(self, x: int) -> bool: s=st
2017-11-02
hello world hello world
init world
2017-10-07
总结一下用python+selenium抢12306票的小程序 总结一下用python+selenium抢12306票的小程序
前段时间买火车票老是需要让携程给我弄什么加速包来抢票,于是就想着自己弄一个抢票的小程序。刚开始本来也没打算用selenium来做,因为这个部署到服务器很麻烦,所以想着用requests+js2py来做,尝试了一下后发现从登陆到订票一系列的参
2017-03-29
5. 最长回文子串 5. 最长回文子串
#!/usr/bin/env python # -*- coding:utf-8 -*- # 暴力枚举所有子串 class Solution: def longestPalindrome(self, s: str) -> st
2017-03-11
8 / 8