quicksort

摘要: import java.util.Arrays;/** * @author Created by on 18/4/20. */public class QuickSort { public static int partition(int[] array, int left, int right) 阅读全文
posted @ 2018-04-20 19:40 教父归来 阅读(115) 评论(0) 推荐(0)

高效分页

摘要: 分页方式二: Select * from table WHERE id >= ( select id from table limit 10000,1 ) limit 10;• 分页方式三: SELECT * FROM table INNER JOIN (SELECT id FROM table 阅读全文
posted @ 2016-09-08 11:13 教父归来 阅读(199) 评论(0) 推荐(0)

二叉树的非递归遍历--中序遍历

摘要: package algorithm;import java.util.Stack;class TreeNode<T> { T data; TreeNode left; TreeNode right; public TreeNode(T data, TreeNode left, TreeNode ri 阅读全文
posted @ 2016-09-05 17:24 教父归来 阅读(131) 评论(0) 推荐(0)

快速排序

摘要: package algorithm;public class QuickSort { //一次划分 public static int partition(int[] arr, int left, int right) { int pivotKey = arr[left]; int pivotPoi 阅读全文
posted @ 2016-09-05 14:54 教父归来 阅读(186) 评论(0) 推荐(0)

折半查找算法

摘要: package algorithm;public class BinarySearch { public static int search(int a[], int key) { int low = 0; int high = a.length - 1; int mid = 0; while (l 阅读全文
posted @ 2016-09-05 11:42 教父归来 阅读(171) 评论(0) 推荐(0)

spring事务传播

摘要: @TransactioalA()@TransactionalB()C()如果A调用B,则A会把它的事务传播给B,它们在同一事务下运行,统一回滚。但如果B方法是require_new,则失败的话,B单独回滚,A不受影响。如果A调用C,则spring会认为C就是A的代码,他们肯定在同一事务下运行,统一回... 阅读全文
posted @ 2015-11-03 10:49 教父归来 阅读(127) 评论(0) 推荐(0)

sql笔试

摘要: SELECT a.name, a.salary ,a.dept_id FROM emp a WHERE salary<(SELECT AVG(salary) FROM emp WHERE a.dept_id=dept_id GROUP BY dept_id); SELECT a.name,a.sa... 阅读全文
posted @ 2015-07-30 11:12 教父归来 阅读(135) 评论(0) 推荐(0)

BeanFactory ApplicationContext

摘要: Bean工厂延迟载入所有的Bean,直到getBean()方法被调用时Bean才 被创建。应用上下文则聪明一点,它会在上下文启动后预载入所有的单实例Bean. 阅读全文
posted @ 2014-02-23 21:46 教父归来 阅读(142) 评论(0) 推荐(0)

单链表逆序

摘要: public static Node reverse(Node head) { Node p = head.next; Node q = p.next; p.next = null; while(q != null) { p = q; q= p.next; p.next = head.next; head.next = p; } return head; } 阅读全文
posted @ 2014-02-22 22:55 教父归来 阅读(111) 评论(0) 推荐(0)

jvm学习好文

摘要: http://blog.csdn.net/historyasamirror/article/details/6233007 阅读全文
posted @ 2014-02-22 22:54 教父归来 阅读(122) 评论(0) 推荐(0)