自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 资源 (1)
  • 收藏
  • 关注

转载 ubuntu 12.04 安装和使用aircrack-ng 教程

原文地址:http://www.maybe520.net/blog/1744/破解无线密码1`backtrack是最合适不过的,从U盘启动backtrack 系统也很方便2`虚拟机中的BT5系统破解无线密码需要插外置的USB网卡3`用ubuntu 来破解密码于是打开终端输入以下命令来安装它sudo apt-get inst

2017-04-05 10:38:32 5233

原创 [leetcode]240. Search a 2D Matrix II

题目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 in ascending from left to right.Inte

2017-03-16 10:06:39 418

原创 [leetcode]74. Search a 2D Matrix

题目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

2017-03-15 15:12:40 418

转载 Java中的 Map.Entry接口与map的遍历方式

source:http://blog.csdn.NET/afeiluo/article/details/12319815【注:本文深入jdk源码探索了map.entry】这里为了一般性我拿HashMap举例首先HashMap的底层实现用的时候一个Entry数组,废话不多说上源码[java] view plain copy

2017-03-15 09:32:43 547

原创 [leetcode]264. Ugly Number II

题目Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of th

2017-03-08 14:19:00 245

原创 [leetcode]263. Ugly Number

题目Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not u

2017-03-07 14:12:59 232

原创 [leetcode]202.Happy Number

题目Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the

2017-03-06 16:10:08 325

原创 【leetcode】150. Evaluate Reverse Polish Notation

题目Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2

2017-03-02 16:37:53 244

原创 冒泡排序、选择排序、快速排序

一 冒泡排序1.简介冒泡排序,故名思议就像气泡漂上来一样,值比较小的在前,值比较大的在后。是一种较简单的排序算法。它重复地走访过要排序的数列,一次比较两个元素,如果他们的顺序错误就他们交换起来2.原理冒泡排序算法的运作如下:a.比较相邻的元素。如果第一个比第二个大,就交换他们两个。b.对每一对相邻元素做同样的工作,从开始第一对到结尾的最后一对c.针对所有的元素重

2017-03-01 20:48:31 277

转载 ARP欺骗教程图解

这个ARP欺骗案例用最简单的拓扑、场景来显示黑客作案的方式、过程。案例有两个版本:仿真、图解。图解版本,从仿真截图,并加标注,说明主要步骤的关键。-          背景:计算机经互联网相连而传递信息,信息标明发送行、接收方的IP地址,而具体的传送是经过链路而实现的。若两个计算机都在同一个局网内,发送方还需要知道接收方的MAC地址(硬件地址)。如果发送方不知道接收方的MAC地址, 就无法

2017-02-27 13:50:16 7608 1

转载 【经典算法】:Dijskstra算法与Floyd算法

Dijkstra算法利用的是一个经典的东西,叫做保持好的最短路径,目的就是为了在寻找最短路径的时候的保持最短化的过程Floyd算法利用的是一个经典的公式  D[I,J]>D[I,K] + D[K,J]  则  D[I J] = D[I K] + D[K J]  这就是Floyd算法最经典的地方Floyd算法最关键的地方就是一个三重循环

2016-12-27 21:53:28 1057

原创 [leetcode] 370. Range Addition

问题Assume you have an array of length n initialized with all 0's and are given k update operations.Each operation is represented as a triplet: [startIndex, endIndex, inc] which increments e

2016-12-13 12:17:39 303

原创 [leetcode]289. Game of Life (java)

题目:According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970."Given a board 

2016-12-12 19:30:56 884

原创 LeetCode—381. Insert Delete GetRandom O(1) - Duplicates allowed (java)

问题:Note: Duplicate elements are allowed.insert(val): Inserts an item val to the collection.remove(val): Removes an item val from the collection if present.getRandom: Returns a random element

2016-12-07 19:23:03 323

原创 [Leetcode]414. Third Maximum Number

问题:Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).Example 1:Inpu

2016-12-06 11:23:59 203

原创 [leetcode]442. Find All Duplicates in an Array(java)

问题:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it wit

2016-12-05 19:32:25 1331

原创 LeetCode 448.Find All Number Disappeared in an Array

问题Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this ar

2016-12-05 09:37:39 809

原创 Silding Window Maximum(滑动窗口的最大值)

一,问题描述 给定一个整数数组nums 和一个正整数k的滑动窗口,滑动窗口每次从左到右移动一个数字,返回每次滑动窗口中的最大值。2,例如: 输入: nums=[1,2,3,4,5,6,7], k=3 输出: 3,4,5,6,73,解题思路: 首先判断数组的长度len与k的大小,如果lenk的话,则定义一个数组data,其长度为len-k+1。然后对于

2016-12-01 17:01:32 434

原创 LeetCode:382 Linked List Random Node蓄水池抽样算法

问题定义长度为N的链表,N很大,但是不知道具体有多大。从N个元素中随机取出K个元素,只能遍历一次链表。用到的算法保证取出的元素恰好有K个,且他们是完全随机的(出现概率均相等)。求解该算法是针对从一个序列中随机抽取不重复的K个数,保证每个数被抽取到的概率为k/n这个问题而构建的。做法是:首先构建一个可放K个元素的蓄水池,将序列的前K个元素放入蓄水池中。然后从第K+1个元素开始

2016-12-01 10:32:01 760

原创 蓄水池抽样算法

问题定义长度为N的链表,N很大,但是不知道具体有多大。从N个元素中随机取出K个元素,只能遍历一次链表。用到的算法保证取出的元素恰好有K个,且他们是完全随机的(出现概率均相等)。求解该算法是针对从一个序列中随机抽取不重复的K个数,保证每个数被抽取到的概率为k/n这个问题而构建的。做法是:首先构建一个可放K个元素的蓄水池,将序列的前K个元素放入蓄水池中。然后从第K+1个元素开始

2016-12-01 09:33:00 423

原创 [Leetcode]398. Random Pick Index

题目:Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array.Note:The

2016-11-30 17:11:31 250

原创 java中Math.max()的方法使用.lang

1.描述java.lang.Math.max(double a,double b)(可以是double 类型,也可以是int类型,float类型),返回最大值。2.声明public static double max(double a, double b)

2016-11-30 10:15:51 15793

转载 数据结构与算法之——八大排序算法

附:关于这个主题,网上好的文章已经数不胜数,本篇是整合后的文章。正文:一、概述排序算法可以分为内部排序和外部排序,内部排序是数据记录在内存中进行排序,而外部排序是因排序的数据很大,一次不能容纳全部的排序记录,在排序过程中需要访问外存。本文所指八大排序就是内部排序。  当n较大,则应采用时间复杂度为O(nlog2n)的排序方法:快速排序、堆排序或归并排

2016-11-28 20:10:32 271

转载 java中PreparedStatement和Statement的区别

1、 PreparedStatement接口继承Statement, PreparedStatement 实例包含已编译的 SQL 语句,所以其执行速度要快于 Statement 对象。2、作为 Statement 的子类,PreparedStatement 继承了 Statement 的所有功能。三种方法      execute、 executeQuery 和 exec

2016-11-13 16:50:29 228

转载 https在jsp中简单使用

https在jsp中简单使用(网络copy) HTTPS实际是SSL over HTTP, 该协议通过SSL在发送方把原始数据进行加密,在接收方解 密,因此,所传送的数据不容易被网络黑客截获和破解。本文介绍HTTPS的三种实现方法 。 方法一 静态超链接 这是目前网站中使用得较多的方法,也最简单。在要求使用SSL进行传输的Web网页链接 中直

2016-10-26 15:55:16 1851

原创 java中运行一段代码所需时间实现方式

package csdn;public class 一段代码运行时间 {public static void main(String[] args) {// TODO Auto-generated method stub//首先获取开始运行的时间,用系统函数System.currentTimeMillis()获取,以毫秒为单位long startTime = Sys

2016-10-19 17:04:46 246

2014-2015(二)学期科研训练题目

针对 java web,文档,有不同的题目,适合学生做训练

2015-07-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除