OMF相关参数:DB_CREATE_FILE_DESTDefines the location
of the default file system directory or Oracle ASM disk group where the database
creates datafiles or ...
分类:
数据库 时间:
2014-06-29 13:34:37
阅读次数:
300
题目
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
方法
数组是有序的,要求创建的二叉树尽量平衡,很容易想到对数组进行二分操作,左边的数组元素是左子树,右边的数组元素是右子树。进行递归操作就可以了。
TreeNode...
分类:
其他好文 时间:
2014-06-20 11:06:46
阅读次数:
257
【题目】
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/ 4 8
/ / 11 13 4
...
分类:
其他好文 时间:
2014-06-20 10:53:08
阅读次数:
181
题目
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
方法
和有序数组的思想基本一样,将链表进行二分。
TreeNode getBST(ListNode head, int len) {
i...
分类:
其他好文 时间:
2014-06-20 09:46:33
阅读次数:
267
Let d(n) be defined as the sum of proper divisors of n (numbers less than
n which divide evenly into n).
If d(a) = b and d(b) = a, where a
b, then a and b are an amicable pair and each of a and
b...
分类:
其他好文 时间:
2014-06-07 13:40:53
阅读次数:
226
mysql where子句的模式匹配今天在应用中遇到了这样的一个问题,有一个字段
t1,其中的值类似于:1,1,1,2,3,3,4,4,5,5,2,4,3,2,1,2需要从里面搜索出比如说:第一个逗号前的数字范围为3-5之间,第三个逗号前的数字的范围为3-5之间,第10个逗号前的数字范围为3-5之间...
分类:
数据库 时间:
2014-06-07 11:07:13
阅读次数:
288
public bool BackupAA() { int temp = 0; int tempdel
= 0; string sql = "INSERT INTO [WMSBAK].[dbo].[AACopy] SELECT * FROM
[TestDB].[dbo].[AA] WHERE Add....
分类:
其他好文 时间:
2014-06-07 09:46:26
阅读次数:
150
为了方便管理,LocalDB提供了一个基于命令行的数据库管理工具SqlLocalDB.exe。下面是SqlLocalDB.exe的路径:%ProgramFiles%\MicrosoftSQLServer\110\Tools\Binn
也可以通过where命令寻找exe文件:我们可以在Windo...
分类:
数据库 时间:
2014-06-06 08:24:34
阅读次数:
412
select * from zan where uid not in(select uid from
zan where zhongjiang !=0) group by uid order by rand() limit
40不过这个执行效率比较低,正在找更好用的方法
分类:
数据库 时间:
2014-06-06 07:43:48
阅读次数:
469
like的语法string[] cities = { "London", "Madrid"
};IQueryable custs = db.Customers.Where(c =>
cities.Contains(c.City));Contains(),包含,完全匹配,非Likein的语法publi...
分类:
数据库 时间:
2014-06-05 18:27:42
阅读次数:
324