Partition an array of integers around a value such taht all elements less than x come before elements greater than or equal to x.Idea: Just use of sub...
分类:
其他好文 时间:
2014-07-15 22:52:15
阅读次数:
239
Given an array arr[] of n integers, construct a Product Array prod[] (of same size) such that prod[i] is equal to the product of all the elements of a...
分类:
其他好文 时间:
2014-07-15 10:03:20
阅读次数:
216
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from ...
分类:
其他好文 时间:
2014-07-13 17:21:40
阅读次数:
208
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
/**
* Defin...
分类:
其他好文 时间:
2014-07-13 15:50:25
阅读次数:
158
Write code to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x.Use two addit...
分类:
其他好文 时间:
2014-07-09 17:44:36
阅读次数:
159
String的比较有两种==和equal()方法:
==:比较的是在堆内存中地址
equal():比较的是值
String s1="hello";
String s2="hello";
String s3=new String("hello");
s1==s2;//结果为true
s1==s3;//结果为false
s1.equal(s2);//结果为true
s1.equal(s3);/...
分类:
其他好文 时间:
2014-07-09 12:43:16
阅读次数:
240
什么是排序规则(collation) 关于SQL Server的排序规则,估计大家都不陌生,在创建数据库时我们经常要选择一种排序规则(conllation),一般我们会留意到每一种语言的排序规则都有许多种,比如标准大陆简体中文Chinese_PRC的排序规则就有数十种之多 这些排序规则有什么作用呢?...
分类:
数据库 时间:
2014-07-07 11:25:54
阅读次数:
276
更改存储过程的时候,在SQL中出现了 “无法解决 equal to 操作的排序规则冲突”错误,网上搜之,发现是表之间元素创建时排序规则不同(一个是collate Chinese_PRC_CI_AI_WS,一个为COLLATE SQL_Latin1_General_CP1_CI_AS)COLLATE ...
分类:
数据库 时间:
2014-07-06 20:32:59
阅读次数:
402
Given two binary trees, write a function to check if they are equal or not.
分类:
其他好文 时间:
2014-07-03 19:26:46
阅读次数:
213
What is the Median?
The Problem
Median plays an important role in the world of statistics. By definition, it is a value which divides an array into two equal parts. In this problem you are ...
分类:
其他好文 时间:
2014-07-03 17:43:53
阅读次数:
250