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
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
1.--查询表的所有内容SELECT * FROM emp;2.--查询员工编号,姓名,基本工资SELECT e.empno,e.ename,e.salFROM emp e;3.--查询职位并去掉重复SELECT DISTINCT e.jobFROM emp e;4.--查询员工编号,姓名,基本工资...
分类:
其他好文 时间:
2015-01-05 21:45:20
阅读次数:
332
/*例子:得到一个用户下所有表的数据条数*/Declare v_tableName VARCHAR2(256);/*存取游标获取的变量*/ v_count NUMBER; Cursor c_tableName is Select Distinct table_name from dba_table....
分类:
数据库 时间:
2015-01-04 16:46:50
阅读次数:
164