【题目】
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers 0, 1, and 2 to represent the color red, white, and...
分类:
其他好文 时间:
2014-06-07 01:17:49
阅读次数:
269
【题目】
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC".
Note:
If there is no such window in S that covers ...
分类:
其他好文 时间:
2014-06-05 11:14:26
阅读次数:
255
题目:给定两个串s1和s2,对s1串,我们可以将其分割成两部分,这两部分都不为空,而被分割成的两部分,又可以递归的进行分割,直到不能进行分割为止,也就是只有一个字符的时候,就不在分割了。问s2是否由s1的这种分割表示中,某步分割成的两部分交换得到的。这种交换可以在不同的分割点进行多次。
/* s1
|__________p____________| ...
分类:
其他好文 时间:
2014-06-05 11:09:06
阅读次数:
207
ByteBuffer position limit flip...
分类:
其他好文 时间:
2014-06-05 10:23:51
阅读次数:
185
【题目】
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC".
Note:
If there is no such window in S that covers ...
关于OOP
博客地址:http://blog.csdn.net/cv_ronny 转载请注明出处!
1,继承可以是单一继承或多重继承,每一个继承连接可以是public、protected或private,也可以是virtual或non-virtual。
2,成员函数的各个选项:virtual或non-virtual或pure-virtual。
3,成员函数和其他语言特性的交互影响:...
分类:
编程语言 时间:
2014-06-05 08:38:28
阅读次数:
421
【题目】
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.
The first integer of each row is greater than the last integer of the previous ...
分类:
其他好文 时间:
2014-06-05 08:28:43
阅读次数:
321
名称空间
定义:
一种分组的方式,它将相关的类分成组以便于使用。
作用:
将类分组管理,增加代码可读性,减少名称冲突。(工作中,经常是多个人负责一个项目,它们在开发过程中给一些类命名时,可能会重名,如果让他们更改,会很麻烦,也很容易在更改过程中产生错误,但是把重名的类放到不同的名称空间中就可以了。)
特性:
名称空间可以嵌套,大的名称空间里可以有小的名称空间。
上图中就是...
分类:
Web程序 时间:
2014-06-05 06:53:53
阅读次数:
265
vb.NET语言的学习,相对于原来的增加了.net平台,也 是基于对vb学习的继承与扩展,是在面向对象基础上的编程语言,vb中学到的控制语句,基本的数据类型,对象的事件,方法,属性等继续应用于vb.net。但是要注意vb.NET强制要求显示转换,例外处理等安全方面与vb的不同之处。...
分类:
Web程序 时间:
2014-06-05 06:29:33
阅读次数:
290
在javascript中闭包是一个很不好理解的概念,但是确实一个不可逃避的东西,那么今天我们就来一起学习一下闭包。
什么是闭包?
闭包:官方”的解释是:闭包是一个拥有许多变量和绑定了这些变量的环境的表达式(通常是一个函数),因而这些变量也是该表达式的一部分。相信读完这句话以后,你就更加不知道什么是闭包了。其实通俗的说闭包就是一个函数a内部的局...
分类:
编程语言 时间:
2014-06-05 06:19:03
阅读次数:
254