??
一个集合可否排序,要看系统知不知道排序的规则,像内建的系统类型,int ,string,short,decimal这些,系统知道怎么排序,而如果一个集合里面放置的是自定义类型,比如自己定义了一个Product类型,要把它排序,系统是不知道怎么办的。
那么,如何告知系统排序的规则呢?有以下几种方法:
1:对类实现IComparable接口,示例如下:
代码1
...
分类:
其他好文 时间:
2014-09-24 19:44:17
阅读次数:
212
分治法,采用一种“分治(divide-and-conquer)”的...
分类:
其他好文 时间:
2014-09-24 18:58:57
阅读次数:
283
Flow Problem
Problem Description
Network flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph....
分类:
其他好文 时间:
2014-09-24 18:35:37
阅读次数:
272
leetcode 新增题目Maximum Product Subarray...
分类:
其他好文 时间:
2014-09-24 17:56:57
阅读次数:
148
【求最大深度】Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
这里说的最大深度是指最深叶子节点到根节点的路径长度
...
分类:
其他好文 时间:
2014-09-24 16:09:37
阅读次数:
200
1.We have a product launch in the coming days. Considering that it's a media event and we can't afford any risk about this, we put great effort to improve the APP's quality at many aspects. For exam...
分类:
移动开发 时间:
2014-09-24 12:29:16
阅读次数:
298
题目信息:
1009. Product of Polynomials (25)
时间限制
400 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
This time, you are suppose...
分类:
其他好文 时间:
2014-09-24 12:01:46
阅读次数:
159
1 2 3 4 5 "> 6 7 8 9 product Name: --访问值栈实例的方法10 11 product name: ${productName} --直接访问值栈实例的属性12 13 prod...
分类:
其他好文 时间:
2014-09-24 11:15:56
阅读次数:
174
题目信息:
1007. Maximum Subsequence Sum (25)
时间限制
400 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
Given a sequence of K i...
分类:
其他好文 时间:
2014-09-24 11:12:56
阅读次数:
364
优点: 符合现在流行的web标准。结构、样式、行为三者实现真正的分离。/*结构-html*/ Home Product About Home Content Product Content About Cont...
分类:
Web程序 时间:
2014-09-24 01:26:15
阅读次数:
268