上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 23 下一页
摘要: #question : Given an array of integers, every element appearstwiceexcept for one. Find that single one.#note : Your algorithm should have a linear run... 阅读全文
posted @ 2015-12-19 12:09 hao.ma 阅读(137) 评论(0) 推荐(0) 编辑
摘要: # The isBadVersion API is already defined for you.# @param version, an integer# @return a bool# def isBadVersion(version):class Solution(object): d... 阅读全文
posted @ 2015-12-17 23:27 hao.ma 阅读(178) 评论(0) 推荐(0) 编辑
摘要: class Solution(object): def searchRange(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[i... 阅读全文
posted @ 2015-12-17 23:08 hao.ma 阅读(357) 评论(0) 推荐(0) 编辑
摘要: class Solution(object): def longestValidParentheses(self, s): """ :type s: str :rtype: int """ maxlen=0 s... 阅读全文
posted @ 2015-12-15 23:34 hao.ma 阅读(119) 评论(0) 推荐(0) 编辑
摘要: rs=dict()rs['item1'] = 'item1'rs['item2'] = 'item2'for k,d in rs.items(): print k,dfor k in rs.keys(): print k,rs[k] 阅读全文
posted @ 2015-12-15 12:34 hao.ma 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #"~" must be used for case sensitive matching #"~*" must be used for case insensitive matching location = / { # this matches only the / query. # configuration example #1 } location / { ... 阅读全文
posted @ 2015-12-10 19:42 hao.ma 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 需求:前端过来一个请求,后台php要通过两次http请求,请求不同的地址得到资源后拼接返回给前端请求A站:请求B站:同时请求A站和B站(php 串行curl_exec )同时请求A站和B站(php 模拟并发curl_multi_exec ):同时请求A站和B站(php通过curl_multi_exe... 阅读全文
posted @ 2015-12-08 21:15 hao.ma 阅读(233) 评论(0) 推荐(0) 编辑
摘要: # Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# sel... 阅读全文
posted @ 2015-12-08 08:16 hao.ma 阅读(188) 评论(0) 推荐(0) 编辑
摘要: # Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio... 阅读全文
posted @ 2015-12-07 23:14 hao.ma 阅读(129) 评论(0) 推荐(0) 编辑
摘要: # Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solutio... 阅读全文
posted @ 2015-12-07 23:07 hao.ma 阅读(119) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 23 下一页