Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or do
分类:
其他好文 时间:
2016-03-08 21:24:13
阅读次数:
189
Longest Palindromic Substring:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and ...
分类:
其他好文 时间:
2016-03-08 20:59:12
阅读次数:
109
$(document).ready(function() { //给所有的td单元格绑定一个click事件 //如果这个table的id为table1,那单给table1的所有td加click事件代码为: // var tds = $("#table1").find("td"); var tds =
分类:
其他好文 时间:
2016-03-08 16:39:58
阅读次数:
114
public function actionList($class_id = '') { $data = Article::find(); if ($class_id) { $data->andWhere([ 'class_id' => $class_id ]); } $pages = new Pa
分类:
其他好文 时间:
2016-03-08 14:57:50
阅读次数:
91
异或巧用:Single Number 今天刷leetcode,碰到了到题Single Number。认为解答非常巧妙,故记之。。。 题目: Given an array of integers, every element appears twice except for one. Find tha
分类:
其他好文 时间:
2016-03-08 14:55:25
阅读次数:
225
Given a binary tree, find its maximum depth. class Solution { public: int maxDepth(TreeNode* root) { int depth=0; if(!root) return depth; int a=maxDep
分类:
其他好文 时间:
2016-03-08 10:46:14
阅读次数:
189
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any
分类:
其他好文 时间:
2016-03-08 07:05:03
阅读次数:
169
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2
分类:
其他好文 时间:
2016-03-08 02:04:43
阅读次数:
123
#coding=utf-8
importrequests
frombs4importBeautifulSoup
importsys
reload(sys)
sys.setdefaultencoding(‘utf8‘)
r=requests.get(‘http://html-color-codes.info/color-names/‘)
html=r.text
#printhtml
soup=BeautifulSoup(html,‘html.parser‘)
trs=soup.find_all(‘tr‘)
f=..
分类:
编程语言 时间:
2016-03-08 00:37:03
阅读次数:
200
题目:
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k.翻译:
给...
分类:
其他好文 时间:
2016-03-07 15:06:41
阅读次数:
148