在解决本道题时,最先想到的思路是用两个指针,一个在前,一个紧随其后。然后后面的指针的不断向后移动直到找到匹配的元素或者到达数组的末端。再不断进行下次迭代。代码如下:#include
#include
using namespace std;class Solution {
public:
vector twoSum(vector& nu...
分类:
其他好文 时间:
2015-07-10 09:32:42
阅读次数:
128
题目:
Reverse digits of an integer.Example1: x = 123, return 321
Example2: x = -123, return -321Here are some good questions to ask before coding. Bonus points for you if you have already though...
分类:
其他好文 时间:
2015-07-10 09:30:30
阅读次数:
107
转载请注明出处:http://blog.csdn.net/sk719887916/article/details/46822663
上篇了解了《非对称加密》后 今天我来继续了解下加密技术中对称加密。
对称加密
对称加密是最传统的加密方式,比上非对称加密,缺少安全性,但是它依旧是用的比较多的加密方法。
对称加密采用单密钥加密方式,不论是加密还是...
分类:
其他好文 时间:
2015-07-10 09:31:14
阅读次数:
166
219 Contains Duplicate II链接:https://leetcode.com/problems/contains-duplicate-ii/
问题描述:
Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in...
分类:
其他好文 时间:
2015-07-10 09:30:38
阅读次数:
113
Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen from...
分类:
其他好文 时间:
2015-07-10 09:29:59
阅读次数:
424
#include
#include
#include
#include
#include
#include
#define MAX 100
using namespace std;
struct edge
{
char preNode; //节点表示只能用单个字符
char nex...
分类:
其他好文 时间:
2015-07-10 09:31:38
阅读次数:
211
题目链接:Quiz for EXO-L
题面:
B - Quiz for EXO-L
Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu
Submit Status Practice ZOJ
3864
Description
Exo (Korea...
分类:
其他好文 时间:
2015-07-10 09:30:10
阅读次数:
113
在这个由软件定义的世界里,企业往往是通过 Web 应用和移动应用程序来提供他们大部分的服务。所以对企业来说,一个非常重要的任务就是要确保用户拥有出色的使用体验。Node.js 正迅速成为时下最流行的平台之一,它被用于方便地搭建响应速度快、易于扩展的网络应用和移动应用程序。通过下图也可以看出,Node.js 正在成为新的主流。众所周知,Node.js 是单线程服务器,新事件会触发代码的执行,进行一系列...
分类:
Web程序 时间:
2015-07-10 09:32:28
阅读次数:
192
操作对象
直接改变容器的内容 将原容器的内容复制一份,修改其副本,然后传回该副本
功能:
非可变序列算法 指不直接修改其所操作的容器内容的算法
计数算法 count、count_if 搜索算法 search、find、find_if、find_first_of、… 比较算法 equal、mismatch、lexicographical...
分类:
编程语言 时间:
2015-07-10 09:30:48
阅读次数:
112
题目链接:Box Game
题面:
12293 Box Game
There are two identical boxes. One of them contains n balls, while the other box contains one...
分类:
其他好文 时间:
2015-07-10 09:31:24
阅读次数:
157
ping 192.168.1.103 -c 3
ping我的IP3次
端口探测
telnet 192.168.1.103 80
路由跟踪
traceroute www.imooc.com
下载命令
wget http://soft.vpser.net/lnmp/lnmp1.1-full.tar.gz
tcpdump命令
tcpdump...
分类:
系统相关 时间:
2015-07-10 09:31:33
阅读次数:
198
前言Webpack 是 OneAPM 前端技术栈中很重要的一部分,它非常好用,如果你还不了解它,建议你阅读这篇 Webpack 入门指迷 ,在 OneAPM 我们用它完成静态资源打包,ES6 代码的转换 ,React 组件的组织等,在接下来的日子里,我们将通过一系列文章和业界分享我们在使用 Webpack 过程中关于性能方面的经验。作为系列文章的第一篇,我们会重点介绍 Webpack 中的 reso...
分类:
Web程序 时间:
2015-07-10 09:29:27
阅读次数:
262
去掉qml恼人的红色下划线...
分类:
其他好文 时间:
2015-07-10 09:29:34
阅读次数:
332
package date;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class datejisuan {
/**
* @param args
* @throws Pars...
分类:
编程语言 时间:
2015-07-10 09:30:20
阅读次数:
130
本文从,进程通信的三种方法——信号与信号量,消息队列和共享内存入手,详细表述了信号量的数据结构与实现方式,PV操作的定义,细节与意义。其次,对消息队列和共享内存方式数据结构和性能给予了分述。最后,在文末给出实现的各种通信形式的源码链接。...
分类:
系统相关 时间:
2015-07-10 09:29:16
阅读次数:
184
Combination Sum II
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
Each number in C may only be used...
分类:
其他好文 时间:
2015-07-10 09:30:20
阅读次数:
237
页面乱码,首先看下网页源码,注意 content-type=’text/html’;charset=“utf-8”;
servlet里面设置request.setCharacterEncoding("utf-8");
如果是向页面写内容,需要设置response.setCharacterEncoding("utf-8");
注意写...
分类:
Web程序 时间:
2015-07-10 09:29:45
阅读次数:
174