The example below shows how to use VB form/control as a container application to display a PowerPoint slideshow. It as shows how to make use of an und...
【题目】
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded region.
For example,
X X X X
X O O X
X X O X
X O X X
After running your function, the board shou...
分类:
其他好文 时间:
2014-06-25 08:02:30
阅读次数:
205
【题目】
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4.
Your algorithm should run...
分类:
其他好文 时间:
2014-06-25 07:55:42
阅读次数:
244
【题目】
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the total sum of all root-to-leaf numbers.
For example,
1
...
分类:
其他好文 时间:
2014-06-25 07:32:27
阅读次数:
209
example: ./netspeed eth0
1 #!/bin/bash
2
3 INTERVAL="1" # update interval in seconds
4
5 if [ -z "$1" ]; then
6 echo
7 echo usage: $0 [network-interface]
8 echo
9 echo ...
分类:
系统相关 时间:
2014-06-25 07:24:00
阅读次数:
213
//MysurfaceView.javapackagecom.example.surfaceview;importandroid.content.Context;importandroid.graphics.Canvas;importandroid.graphics.Color;importandroid.graphics.Paint;importandroid.view.MotionEvent;importandroid.view.SurfaceHolder;importandroid.view.Surfa..
分类:
移动开发 时间:
2014-06-25 06:25:42
阅读次数:
428
【问题】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
【代码】
class Solution:
# @param s, a string
# @retu...
分类:
其他好文 时间:
2014-06-24 21:00:30
阅读次数:
168
【题目】
Given a binary tree, find the maximum path sum.
The path may start and end at any node in the tree.
For example:
Given the below binary tree,
1
/ 2 3
Return 6.
【题意】
给定一棵二叉树,找出其中路径和最大的路径,然会返回最大路径和。
本题中的路径不是从根节点到叶子节点这样的传统的路...
分类:
其他好文 时间:
2014-06-24 20:42:59
阅读次数:
268
Given a string, determine if it is a palindrome, considering only alphanumeric
characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" i...
分类:
其他好文 时间:
2014-06-24 18:16:02
阅读次数:
147
【题目】
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a palindrome.
Note:
Have you consider that the string m...
分类:
其他好文 时间:
2014-06-24 15:35:07
阅读次数:
150