【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
For example,
Given input array A ...
分类:
其他好文 时间:
2014-05-18 18:25:19
阅读次数:
272
【题目】
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
【题意】
删除数组中指定的值。不关心在新数组的后面即数组尾部留下了什么值。
【思路】
思路同Remo...
分类:
其他好文 时间:
2014-05-18 14:53:56
阅读次数:
208
下面我们来了解如何实现一个自定义的迭代器,然后再开始慢慢理解迭代器的内部工作原理。先来看一个官方的例子:
<?php
class myIterator implements Iterator {
private $position = 0;
private $array = array(
"first_element",
"second_element",
"last_element",
);...
分类:
Web程序 时间:
2014-05-18 13:58:23
阅读次数:
404
由于项目中需要用到webservice来做接口,于是花点时间先做知识储备。
开始的时候觉着这个webservice就是一个http请求啊,服务端监听,客户端发送xml报文,然后解析下发送了什么内容,返回响应的数据。
这是百度百科对webservice的定义,一般使用wsdl来描述服务。
后来我的误区就是 wsdl的xml 和 用http 请求组成的xml也就是用soap来请求webserv...
分类:
编程语言 时间:
2014-05-18 13:56:19
阅读次数:
410
4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target....
分类:
其他好文 时间:
2014-05-18 13:49:09
阅读次数:
306
Point pos(100, 100); //start point
m_animSprite->setPosition(pos);
int count = 8; float radius = 50.f; float angle = 360.f/count; auto array = PointArray::create(count + 1); Point pt0(r...
分类:
其他好文 时间:
2014-05-18 07:02:31
阅读次数:
250
1.1 Paraview的通信模式
ParaView 服务器(ParaVie w Server),提供了运行并行,交互可视化所必须的抽象层,使用户应用程序不必考虑诸如 ParaView 是否和如何在并行状态下运行等问题。VTK 提供了数据处理和渲染的核心算法。VTK,与一些其他的函数库(基础图形库 OpenGL,用于并行运算的 MPI 等)来提供可视化处理功能,如渲染,并行处理,文件输入输出,和...
分类:
其他好文 时间:
2014-05-18 06:58:22
阅读次数:
416
本文参考《Android系统源代码情景分析》,作者罗升阳
一、测试代码:
~/Android/external/binder/server
----FregServer.cpp
~/Android/external/binder/common
----IFregService.cpp...
分类:
移动开发 时间:
2014-05-18 06:08:05
阅读次数:
494
3SumClosest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution....
分类:
其他好文 时间:
2014-05-18 05:57:48
阅读次数:
244
本篇主要讲解查询语句,所有的示例都会按照下面这张表进行。
stuID
stuName
age
sex
11090241031
王小虎
21
男
11090241032...
分类:
数据库 时间:
2014-05-18 03:29:16
阅读次数:
442