自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 资源 (3)
  • 收藏
  • 关注

原创 数据结构中的7种排序算法

数据结构中的7种排序算法排序是将一个记录的任意序列重新排列成一个按键值有序的序列。 时间复杂度主要考虑元素的移动次数。 结构如下: 1.直接插入排序 1,定义:依次将待排序序列中的每一个记录插入到一个已经排好序的序列中,直到全部记录都排好序。 2,时间复杂度:在最好情况下,待排序序列为正序,时间复杂度为O(n);最坏情况下,待排序序列为逆序,时间复杂度为O(n^2);平均情况下,时间

2016-03-31 16:12:23 2221 1

原创 腾讯2016在线模拟笔试

腾讯2016在线模拟笔试题目1,若系统中有5台打印机,现有多个进程均申请使用两台,若规定每个进程一次仅允许申请一台,要使系统不会发生死锁,至多允许( )个进程参与竞争。 A.2 B.3 C.4 D.5 正确答案:C 解析:由于系统资源总共只有5台,若有5个进程参与竞争,每个进程在拥有一台打印机后,由于都需要两台打印机,所有进程都不能向前推进,假设又都不愿意放弃已申请到的打印机,系统便进入

2016-03-30 14:04:24 1456

转载 C++ ofstream和ifstream详细用法

原文出自【比特网】, 原文链接:http://soft.chinabyte.com/database/460/11433960.shtmlC++ ofstream和ifstream详细用法ofstream是从内存到硬盘,ifstream是从硬盘到内存,其实所谓的流缓冲就是内存空间;  在C++中,有一个stream这个类,所有的I/O都以这个“流”类为基础的,包括我们要认识的文件I/O,strea

2016-03-30 10:57:05 434

原创 JVM内存分配与回收策略

JVM内存分配与回收策略1对象优先在Eden分配//-verbose:gc -Xms20M -Xmx20M -Xmn10M -XX:SurvivorRatio=8 -XX:+PrintGCDetails //-XX:+UseSerialGC public static void testAllocation(){ byte[] allocat

2016-03-29 16:28:30 641 1

原创 JVM的垃圾收集器

JVM的垃圾收集器Serial收集器(复制) 1,Serial收集器是最基本,历史最悠久的收集器,曾经(在JDK1.3.1之前)是虚拟机新生代收集的唯一选择。 2,Serial是一个单线程的收集器,但它的“单线程”的意义并不仅仅是说明它只会使用一个CPU或一条收集线程去完成垃圾收集工作,更重要的是在它进行垃圾收集时,必须暂停其他所有的工作线程(“Stop The World”),直到它收集

2016-03-29 15:59:02 360

原创 leetcode 206. Reverse Linked List

leetcode 206. Reverse Linked List题目 Reverse a singly linked list.解/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) {

2016-03-25 16:15:40 530

原创 如何计算树中叶子结点的个数?

如何计算树中叶子结点的个数?题目 已知一棵度为3的树有2个度为1的结点,3个度为2的结点,4个度为3 的结点。则该树中有多少个叶子结点?解1设共有N个结点,N-1条边( 因为树中边和结点的关系为:结点数=边数+1),X个叶子结点,则有(PS:x表示乘号) N=X+2+3+4 (1) N-1=0xX+1x2+2x3+3x4 (2) 将两个等式连立,则有 X=12

2016-03-25 16:13:12 41183 2

原创 java.lang.ClassNotFoundException与java.lang.NoClassDefFoundError的区别

1,java.lang.ClassNotFoundException ClassNotFoundException这个错误,比较常见也好理解。 原因:就是找不到指定的class。 常见的场景就是: 1 调用class的forName方法时,找不到指定的类 2 ClassLoader 中的 findSystemClass() 方法时,找不到指定的类 3 Class

2016-03-24 14:20:24 627

原创 如何计算Eden区的大小

如何计算Eden区的大小题目 已知虚拟机的一些参数设置如下: -Xms:1G; -Xmx:2G; -Xmn:500M; -XX:MaxPermSize:64M; -XX:+UseConcMarkSweepGC; -XX:SurvivorRatio=3; 求Eden区域的大小?分析 这是网易2016年在线笔试题中的一道选择题。

2016-03-24 13:32:16 7289

原创 leetcode 169. Majority Element

leetcode 169. Majority Element题目 Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is n

2016-03-24 10:52:10 574

原创 网易2016在线笔试小结

网易2016在线笔试小结计算机网络 1,TCP/IP协议,比如那些协议属于IP层; 2,HTTP协议; HTTP协议 3,HTTP状态码,比如302(临时的重定向),206(服务器已经成功处理了部分 GET 请求)的含义。 HTTP状态码Linux 1,当前用户的权限是什么,怎样给当前组的所有成员赋予一定的权限;数据结构 1,二叉树的遍历,比如,已经给出先序

2016-03-23 16:35:13 1342

原创 leetcode 84. Largest Rectangle in Histogram

leetcode 84. Largest Rectangle in Histogram题目Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.

2016-03-23 15:28:54 382

原创 猴子吃桃子问题

猴子吃桃子问题题目 猴子吃一堆桃子,不知道总共有多少个桃子,第一天吃了总数的一半,不过瘾,又吃了三个。后来决定奇数天吃剩下桃子的一半加3个,偶数天吃剩下桃子的一半加1个。到最后一天的时候,只剩下了一个桃子。如果给定天数,能不能算出来总共的桃子数?分析 1,如果最后一天剩下一个桃子,则可以往回倒推。 2,如果最后一天是偶数天,则前一天是奇数天,还有8个桃子(吃掉一半(4个),再吃3个,

2016-03-23 13:57:51 997

原创 leetcode 217. Contains Duplicate

leetcode 217. Contains Duplicate题目 Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it sho

2016-03-23 11:25:50 377

原创 leetcode 171. Excel Sheet Column Number

leetcode 171. Excel Sheet Column Number题目 Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For example:

2016-03-22 16:00:19 318

原创 leetcode 242. Valid Anagram

leetcode 242. Valid Anagram题目 Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”

2016-03-22 10:14:44 287

原创 关于JAVA的GC算法

关于JAVA的GC算法GC算法都是针对堆区的一:判断一个对象是否已死? 1,引用计数算法: 给对象中添加一个引用计数器,每当有一个地方引用它时,计数器值就加1;当引用失效时,计数器值就减1;任何时刻计数器都为0的对象就是不可能再被使用的。 缺点:很难解决对象之间的相互循环引用的问题。 2,根搜索算法:(JAVA 和 C # 所使用的方法) 通过一系列的名为“GC R

2016-03-18 16:48:04 428

原创 leetcode 100. Same Tree

100. Same Tree题目 1,Given two binary trees, write a function to check if they are equal or not. 2,Two binary trees are considered equal if they are structurally identical and the nodes have the sam

2016-03-18 10:23:16 607

原创 在Eclipse的Debug页签中设置虚拟机参数

在Eclipse的Debug页签中设置虚拟机参数步骤 1,Run->Debug configurations->Java Application 2,选中已经写好的项目 3,Arguments->VM arguments 4,在VM arguments 里面就可以对虚拟机的内存参数进行设置 5,设置完成后,Apply->Debug 6,过程结束截图

2016-03-17 15:52:30 5133 1

原创 leetcode 237. Delete Node in a Linked List

leetcode 237. Delete Node in a Linked List题目 Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 ->

2016-03-17 10:42:54 564

原创 leetcode 283. Move Zeroes

leetcode 283. Move Zeroes题目Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12

2016-03-16 17:17:18 385

原创 leetcode 226. Invert Binary Tree(二叉树的镜像)

leetcode 226. Invert Binary Tree题目Total Accepted: 76777 Total Submissions: 172853 Difficulty: Easy Invert a binary tree.答案1(c++) /** * Definition for a binary tree node. * struct TreeNo

2016-03-15 16:54:19 602

原创 关于停止Windows系统更新

关于停止Windows系统更新换了新的电脑,C盘空间本就不多,被该死的系统更新烦到不行,所以下定决心,整理一下关于停止系统更新,以及如何删除系统的更新文件:停止更新系统 1,开始->控制面板->系统和安全->Windows Update->更改设置 2,重要更新->从不检查更新(不推荐)->确定 3,完成删除更新文件 1,C->Windows->SoftwareDistribu

2016-03-03 10:35:34 952

SpringMVC需要的jar包

SpringMVC需要的jar包

2016-12-29

hibernate需要的jar包们

HIbernate需要的jar包,注意里面的log4j.jar,一定要加进去。

2016-12-14

构建struts2的7个jar包

解压后,将这7个jar包放入项目的/WebRoot/WEB-INF/lib下即可。

2016-12-13

空空如也

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

TA关注的人

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