![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构与算法
Sacrifice__
野生程序员 资深狗粮试吃员
展开
-
无限级联动递归查找上级节点
最近项目中遇到的问题做下总结递归查询 : (无限级联)树的最末尾端的code反查上级所有节点 ##public List<Map<String, Object>> getCategoryByImtemcode(String itemcode) throws Exception { List<Map<String, Object>> list = new ArrayList<Map<S原创 2016-08-31 11:29:02 · 2378 阅读 · 0 评论 -
二分查找算法的两种实现
前提条件必须元素有序 ,推荐第一种package binary;public class Test { public static void main(String[] args) { // int[] i = new int[]{1,4,6,8,9,11,33,44,55}; int[] i = { 3, 6, 8, 9, 11, 55, 66 };原创 2016-08-31 11:24:34 · 487 阅读 · 0 评论