You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:
其他好文 时间:
2015-01-08 14:42:31
阅读次数:
160
You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:
其他好文 时间:
2015-01-08 13:14:25
阅读次数:
119
1. select * from emp;2. select empno, ename, job from emp;3. select empno 编号, ename 姓名, job 工作 from emp;4. select job from emp;5. select distinct job ...
分类:
数据库 时间:
2015-01-07 18:30:36
阅读次数:
236
这题目是经典的DP题目,也可叫作LIS(Longest Increasing Subsequence)最长上升子序列 或者 最长不下降子序列。很基础的题目,有两种算法,复杂度分别为O(n*logn)和O(n^2) 。A.O(n^2)算法分析如下:(a[1]...a[n] 存的都是输入的数)1、对于a...
分类:
编程语言 时间:
2015-01-07 18:26:49
阅读次数:
280
MySQL字段连接函数GROUP_CONCAT
该函数返回带有来自一个组的连接的非NULL值的字符串结果。该函数是一个增强的Sybase SQL Anywhere支持的基本LIST()函数。
语法结构:
GROUP_CONCAT([DISTINCT] expr [,expr ...] [ORD...
分类:
数据库 时间:
2015-01-07 12:51:07
阅读次数:
274
SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must...
分类:
其他好文 时间:
2015-01-06 19:48:38
阅读次数:
143
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.
For example, Given s = “eceba”,
T is "ece" which its length is 3.
这题的线性解法是维护一个sliding w...
分类:
其他好文 时间:
2015-01-06 07:20:32
阅读次数:
121
对数据表的插入、更新、删除操作 --数据查询和管理--取消重复元组distinctselect distinct 民族 from 学生信息go--查询前几列数据select top 6 * from 学生信息select top 6 学号,姓名,民族 from 学生信息go--查询计算列sele.....
分类:
其他好文 时间:
2015-01-06 00:42:51
阅读次数:
231
问题描述:
Given a string S and a string
T, count the number of distinct subsequences of T in
S.
A subsequence of a string is a new string which is formed from the original string by deleting some...
分类:
其他好文 时间:
2015-01-05 21:58:33
阅读次数:
185