List xx = new List();T x = xx.First(x=>x.x ==x); //寻找对象其中一个匹配值,返回对象xx.Any(x=> x.x == x); //寻找对象其中一个匹配值,返回boolusing System;using System.Collectio...
Write an algorithm to determine if a number is “happy”.A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of i...
分类:
移动开发 时间:
2015-04-28 16:19:46
阅读次数:
156
Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The...
分类:
其他好文 时间:
2015-04-28 01:34:19
阅读次数:
127
To The MaxProblem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-...
分类:
其他好文 时间:
2015-04-27 21:25:15
阅读次数:
100
P -Treasure ExplorationTime Limit:6000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2594DescriptionHave you ever read any...
分类:
编程语言 时间:
2015-04-27 19:45:11
阅读次数:
188
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer...
分类:
移动开发 时间:
2015-04-27 18:11:45
阅读次数:
154
Greg has a weighed directed graph, consisting of n vertices. In this graph any pair of distinct vertices has an edge between them in both directions. Greg loves playing with the graph and now he has in...
分类:
其他好文 时间:
2015-04-27 15:17:42
阅读次数:
112
Typical tree recursion works. The key is: ANY node can be treated as the root, since it is about edge, not about node. This simplifies things a lot.#i...
分类:
其他好文 时间:
2015-04-27 14:59:09
阅读次数:
120
problem:
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
...
分类:
其他好文 时间:
2015-04-27 13:20:29
阅读次数:
130
Happy Number问题:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any p...
分类:
移动开发 时间:
2015-04-26 22:42:59
阅读次数:
166