自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 java写文件、导出效率问题以及下载问题

首先比较常用的输出流方法分为两大类:OutputStream类和Writer类,分别有FileOutputStream、BufferedOutputStream、FileWriter和BufferedWriter。他们的性能问题可以详细见FileOutputStream、BufferedOutputStream和BufferedWriter的性能对比还有FileOutputStream和File...

2018-10-09 20:34:41 437

原创 java 基础知识

前言这篇主要是针对java基础知识点的梳理,会根据我自己掌握不太牢固的知识点进行整理,可能不太适合初学者。并且还会有一些自己的理解。持续更新哦java类与对象引用如果一个变量是基本类型,比如 int hp = 50;我们就直接管hp叫变量,=表示赋值的意思。如果一个变量是类类型,比如 Hero h = new Hero();我们就管h叫做引用。=不再是赋值的意思,=表示指向的意思。比如...

2018-09-24 17:13:48 133

原创 数据库知识点总结(实战性)

something to say我在开发过程中,遇到了很多有关于数据库有意思的点,以mysql为基础,拿出来分享一下下,持续更新哦关键字in name 213_3213事件:有一个类型为varchar的字段name,用sql语句查询的时候 select *from abcwhere name in (213)这name=”213_3213”一条数...

2018-09-13 21:41:19 127

原创 编程之美--第二章 读书笔记

2.1 求二进制数中的1的个数最优解法:复杂度为O(k) k为二进制中1的个数public int count(int n){ int num=0; while(n){ //从后往前数‘1’的个数 //n&(n-1)这种方式可以消去一个‘1’ //e.g. 10000&01111=00000 n...

2018-09-05 20:20:27 91

原创 leetcode 算法题的技巧总结

BST Binary Search Tree

2018-09-04 19:59:54 199

原创 343. Integer Break

Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, retur

2018-01-15 20:42:15 107

原创 java Class文档

容器类Listadd 添加元素contains(e) 是否存在该元素 返回true,若存在remove(e) 删除元素 boolean 如果e是object,删除第一个出现的e元素,并返回true 如果e是int,删除第一个出现的e元素数组排序Comparator cmp = new MyComparator();Arrays.sort(a, cm

2018-01-11 20:30:01 163

原创 209. Minimum Size Subarray Sumœ

描述: 给出一个数组a,找到在数组a中的一个最短连续序列,使得序列之和大于等于s代码:class Solution { public int minSubArrayLen(int s, int[] a) { if (a == null || a.length == 0) return 0; int i = 0,

2018-01-11 20:15:44 134

原创 63. Unique Paths II

描述: 唯一路径:意思就是从[0,0]到[n,m](最右下角的方格)的路径 在矩阵中,0表示可通行,1表示有阻碍。求有多少条唯一路径。具体分析: 运用动态规划,result[i][j]=result[i-1][j]+result[i][j-1]; - 其中result[i][j]表示的是到达[i,j]的方格时,有多少条唯一路径; - 所以result[i][j]=result[i

2018-01-10 12:22:36 128

原创 105. Construct Binary Tree from Preorder and Inorder Traversal

描述基于给出的前序遍历和中序遍历,构造出二叉树。参考文献Construct Binary Tree From Inorder and Preorder/Postorder Traversal 前序遍历和中序遍历的分析重复值在前序遍历和中序遍历中不会存在重复的item,因为如果存在重复的值,那么其表达的二叉树一定会产生歧义。 例如:preorder =

2018-01-09 21:10:08 88

原创 OpenJudge 2253:Frogger

2253:Frogger描述 Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full o

2016-06-11 14:56:29 271

原创 1154:LETTERS

描述 A single-player game is played on a rectangular board divided in R rows and C columns. There is a single uppercase letter (A-Z) written in every position in the board. Before the begging of the ga

2016-06-04 21:46:55 281

原创 2749:分解因数

描述 给出一个正整数a,要求分解成若干个正整数的乘积,即a = a1 * a2 * a3 * … * an,并且1 < a1 <= a2 <= a3 <= … <= an,问这样的分解的种数有多少。注意到a = a也是一种分解。 输入 第1行是测试数据的组数n,后面跟着n行输入。每组测试数据占1行,包括一个正整数a (1 < a < 32768) 输出 n行,每行输出对应一个输入。输出应是

2016-06-04 21:19:40 485

原创 1285:Combinations, Once Again

描述 Given n objects you’d have to tell how many different groups can be chosen if r objects are taken at a time. 输入 Input consists of less than 100 test cases. Each test case begins with two integers

2016-06-04 20:42:28 482

空空如也

空空如也

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

TA关注的人

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