通过看jdk源码发现Java字符串中有如下关系:
接口中的方法默认都是抽象的可以写也可以不写。
public interface CharSequence {
int length();
char charAt(int index);
CharSequence subSequence(int start, int end);
...
分类:
编程语言 时间:
2014-12-02 22:38:36
阅读次数:
254
1 for( int i=0;i p.Field("DN").ToString()).Distinct().ToList();6 cbbDn.Items.AddRange(DnList.ToArray());7 }View Code
分类:
其他好文 时间:
2014-12-02 20:42:34
阅读次数:
108
最长公共子序列
时间限制:3000 ms | 内存限制:65535 KB
难度:3
描述咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。
tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 S ,如果分别是两个或多个已知序列的子序列,且是所有符合...
分类:
其他好文 时间:
2014-12-02 19:22:22
阅读次数:
194
经典的最长公共子序列问题。
要注意的是题目中的输入会包含空格的情况,所以要用gets实现输入。
代码如下:
#include
#include
#include
using namespace std;
int dp[1100][1100];
int main()
{
char str1[1100],str2[1100];
int i,j;
whi...
分类:
其他好文 时间:
2014-12-02 19:17:00
阅读次数:
227
问题描述:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only
distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Giv...
分类:
其他好文 时间:
2014-12-01 22:31:26
阅读次数:
221
use 学生--1、 查询Student表中的所有记录的Sname、Ssex和Class列。select sname,ssex,class from student--2、 查询教师所有的单位即不重复的Depart列。select distinct depart from teacher--3、 查...
分类:
其他好文 时间:
2014-12-01 10:04:09
阅读次数:
214
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.#include#include#includeusi...
分类:
其他好文 时间:
2014-11-30 21:22:31
阅读次数:
163
Android是一个特权分隔的操作系统,每个app都会带着系统唯一标识(Linux UID和GID)来运行. 系统的某些部分也被分隔成唯一的标识. 从而Linux系统可以把每个app与其他app隔离开来.Android is a privilege-separated operating system, in which each application runs with a distinct system identity (Linux user ID and group ID). Parts of t...
分类:
移动开发 时间:
2014-11-30 18:48:39
阅读次数:
268
1. SUM SUM是一个求和函数,返回指定列值的总和。SUM 只能用于数字列。其中忽略 Null 值。 语法:SUM ( [ ALL | DISTINCT ] expression ) OVER ( [ partition_by_clause ] order_by_clause ) ...
分类:
数据库 时间:
2014-11-30 18:38:26
阅读次数:
159
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?思路分析:考察DP,定义ClimbWays数组,ClimbWays[n]...
分类:
其他好文 时间:
2014-11-29 07:06:29
阅读次数:
175