码迷,mamicode.com
首页 > 2015年07月10日 > 全部分享
LeetCode || Two Sum
在解决本道题时,最先想到的思路是用两个指针,一个在前,一个紧随其后。然后后面的指针的不断向后移动直到找到匹配的元素或者到达数组的末端。再不断进行下次迭代。代码如下:#include #include using namespace std;class Solution { public: vector twoSum(vector& nu...
分类:其他好文   时间:2015-07-10 09:32:42    阅读次数:128
leetcode Reverse integer
题目: 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
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
leetCode 39.Combination Sum(组合总和) 解题思路和方法
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
NFA到DFA的转换
#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
ZOJ 3864 Quiz for EXO-L
题目链接: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
Node.js 应用性能优化的五个技巧
在这个由软件定义的世界里,企业往往是通过 Web 应用和移动应用程序来提供他们大部分的服务。所以对企业来说,一个非常重要的任务就是要确保用户拥有出色的使用体验。Node.js 正迅速成为时下最流行的平台之一,它被用于方便地搭建响应速度快、易于扩展的网络应用和移动应用程序。通过下图也可以看出,Node.js 正在成为新的主流。众所周知,Node.js 是单线程服务器,新事件会触发代码的执行,进行一系列...
分类:Web程序   时间:2015-07-10 09:32:28    阅读次数:192
STL中算法分类
操作对象 直接改变容器的内容 将原容器的内容复制一份,修改其副本,然后传回该副本 功能: 非可变序列算法 指不直接修改其所操作的容器内容的算法 计数算法        count、count_if 搜索算法        search、find、find_if、find_first_of、… 比较算法        equal、mismatch、lexicographical...
分类:编程语言   时间:2015-07-10 09:30:48    阅读次数:112
UVA 12293 Box Game(博弈入门)
题目链接: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
linux网络测试命令
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 性能优化 (一)(使用别名做重定向)
前言Webpack 是 OneAPM 前端技术栈中很重要的一部分,它非常好用,如果你还不了解它,建议你阅读这篇 Webpack 入门指迷 ,在 OneAPM 我们用它完成静态资源打包,ES6 代码的转换 ,React 组件的组织等,在接下来的日子里,我们将通过一系列文章和业界分享我们在使用 Webpack 过程中关于性能方面的经验。作为系列文章的第一篇,我们会重点介绍 Webpack 中的 reso...
分类:Web程序   时间:2015-07-10 09:29:27    阅读次数:262
qml 隐藏技——去掉让人烦恼的红色下划线
去掉qml恼人的红色下划线...
分类:其他好文   时间:2015-07-10 09:29:34    阅读次数:332
java 实现 日期之间的天数差
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
leetCode 40.Combination Sum II(组合总和II) 解题思路和方法
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
JSP开发常见乱码处理
页面乱码,首先看下网页源码,注意 content-type=’text/html’;charset=“utf-8”; servlet里面设置request.setCharacterEncoding("utf-8");   如果是向页面写内容,需要设置response.setCharacterEncoding("utf-8");            注意写...
分类:Web程序   时间:2015-07-10 09:29:45    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!