wangyp

博客园 首页 联系 订阅 管理

2018年12月4日

摘要: 如何刷题?就是200道题! 原则: 生长学习法+科学练习 生长学习法: 你是怎么想到的?思路!==》思路报告! 思路报告: 01.题目 02.例子 03.题目假设 04.重要问题 05.直觉 06.解决方法的可能性 07.解决方案 08.数据结构 09.算法复杂度:时间空间 总结: 要有脑子! 阅读全文
posted @ 2018-12-04 17:57 wangyp 阅读(173) 评论(0) 推荐(0) 编辑

摘要: class MyQueue(object): def __init__(self, ): """ Initialize your data structure here. """ self.instack = [] self.outstack = [] def push(self, x): ... 阅读全文
posted @ 2018-12-04 17:43 wangyp 阅读(135) 评论(0) 推荐(0) 编辑

摘要: s = 'we are happy's = s.replace(' ','%20')print s s = 'we are happy' s = s.replace(' ','%20') print s 阅读全文
posted @ 2018-12-04 17:39 wangyp 阅读(78) 评论(0) 推荐(0) 编辑

摘要: # -*- coding:utf-8 -*- from collections import Counter class Solution(object): def findRepeatNum(self,input_list): if not input_list: return c = Counter(input_list) ... 阅读全文
posted @ 2018-12-04 17:38 wangyp 阅读(105) 评论(0) 推荐(0) 编辑

摘要: # -*- coding:utf-8 -*- class Solution(object): def fNumInSorted(self,input_list,target_num): if not input_list: return if not target_num: return r... 阅读全文
posted @ 2018-12-04 17:38 wangyp 阅读(111) 评论(0) 推荐(0) 编辑

摘要: # -*- coding:utf-8 -*- from collections import Counter class Solution(object): def findRepeatNum(self,input_list): if not input_list: return c = Counter(input_list) ... 阅读全文
posted @ 2018-12-04 17:35 wangyp 阅读(133) 评论(0) 推荐(0) 编辑