2018年6月11日

RBAC 资源访问控制

摘要: 依靠角色来限定的访问控制 As a role is primarily a behavioral concept, the logical step when developing software is to use Roles as a means to control access to ap 阅读全文

posted @ 2018-06-11 17:28 一个新人代码农民 阅读(178) 评论(0) 推荐(0) 编辑

2018年3月30日

快速排序

摘要: 快排和插入,选择,等等都是最重要的排序方式。快排虽然简单,但是其中蕴含了很多基础而又重要的计算机原理,首先是递归性。 与插入选择不一样,快排天生是一个递归的算法。 首先我们来讨论一下快排的算法原理,这是一个应用分治原理的算法,该算法的实现过程为: 1,取数据集的一个基准数 2,把比基准数大的放右边, 阅读全文

posted @ 2018-03-30 10:10 一个新人代码农民 阅读(108) 评论(0) 推荐(0) 编辑

2018年3月27日

插入排序,冒泡排序

摘要: 这两个都是最基础的排序方式,在这里就放在一起讨论并解析了。首先是冒泡排序法,时间复杂度是O(n2) ,并且和数据初始情况无关,也就是不论怎么排都得遍历全部 数据。 首先解析它的实现原理: 1,比较相邻的两个元素,最开始就是第一个和第二个,按照数据大小排列,比如大的放前面小的后面。然后比较下面两个,第 阅读全文

posted @ 2018-03-27 14:18 一个新人代码农民 阅读(257) 评论(0) 推荐(0) 编辑

2018年3月7日

lintcode2 尾部的零

摘要: 这题就是在求阶乘后面的0,我第一次想的方法很简单,先乘出来然后在除10,肯定可以了。但是这个的时间复杂度超了 所以我们使用获取能被5整除的数字的方法来求值 其实是个数学问题,和你的编程能力没什么关系。。。 阅读全文

posted @ 2018-03-07 15:53 一个新人代码农民 阅读(115) 评论(0) 推荐(0) 编辑

2018年2月25日

617. Merge Two Binary Trees

摘要: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文

posted @ 2018-02-25 21:48 一个新人代码农民 阅读(94) 评论(0) 推荐(0) 编辑

leetcode 657. Judge Route Circle

摘要: Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the or 阅读全文

posted @ 2018-02-25 21:04 一个新人代码农民 阅读(111) 评论(0) 推荐(0) 编辑

leetcaode Hamming Distance

摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文

posted @ 2018-02-25 15:44 一个新人代码农民 阅读(189) 评论(0) 推荐(0) 编辑

2017年12月11日

三个初级的Java算法函数

摘要: 1.九九乘法表 2.寻找1000以内的素数 3.阶乘 阅读全文

posted @ 2017-12-11 16:19 一个新人代码农民 阅读(322) 评论(0) 推荐(0) 编辑

2017年11月23日

Java中的构造函数

摘要: 在Java当中 ,构造函数一般都是创建对象时初始化对象,即为对象成员变量赋初始值,使用时必须和new运算符一起使用。 构造方法的作用一:对对象进行初始化 构造函数与普通函数的区别: (1). 一般函数是用于定义对象应该具备的功能。而构造函数定义的是,对象在调用功能之前,在建立时,应该具备的一些内容。 阅读全文

posted @ 2017-11-23 15:59 一个新人代码农民 阅读(4834) 评论(0) 推荐(0) 编辑

导航