摘要:
#question : Given an array of integers, every element appearstwiceexcept for one. Find that single one.#note : Your algorithm should have a linear run... 阅读全文
摘要:
# The isBadVersion API is already defined for you.# @param version, an integer# @return a bool# def isBadVersion(version):class Solution(object): d... 阅读全文
摘要:
class Solution(object): def searchRange(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[i... 阅读全文
摘要:
class Solution(object): def longestValidParentheses(self, s): """ :type s: str :rtype: int """ maxlen=0 s... 阅读全文
摘要:
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] 阅读全文
摘要:
#"~" must be used for case sensitive matching #"~*" must be used for case insensitive matching location = / { # this matches only the / query. # configuration example #1 } location / { ... 阅读全文
摘要:
需求:前端过来一个请求,后台php要通过两次http请求,请求不同的地址得到资源后拼接返回给前端请求A站:请求B站:同时请求A站和B站(php 串行curl_exec )同时请求A站和B站(php 模拟并发curl_multi_exec ):同时请求A站和B站(php通过curl_multi_exe... 阅读全文
摘要:
# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# sel... 阅读全文