上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 81 下一页
摘要: 参考: https://zhuanlan.zhihu.com/p/355997933 https://zhuanlan.zhihu.com/p/172635547 https://www.cnblogs.com/guochaoxxl/p/14382431.html https://support.t 阅读全文
posted @ 2021-10-21 14:08 Mars.wang 阅读(297) 评论(0) 推荐(0)
摘要: 我们都知道break结束最近一层循环,continue结束本次循环 那如果我满足条件的时候想要结束两层循环怎办? java还真有这种办法 //给外层循环一个名字 outLoop: while (!queue.isEmpty()) { Graph7.Node node = queue.remove() 阅读全文
posted @ 2021-10-20 11:17 Mars.wang 阅读(157) 评论(0) 推荐(0)
摘要: 参考: https://zhuanlan.zhihu.com/p/36229547 https://www.cnblogs.com/-citywall123/p/11322771.html https://blog.csdn.net/Patrickpwq/article/details/802108 阅读全文
posted @ 2021-10-19 11:24 Mars.wang 阅读(256) 评论(0) 推荐(0)
摘要: 参考: https://www.cnblogs.com/lishanlei/p/10707808.html https://blog.csdn.net/wang379275614/article/details/13990163 关键路径问题来源于实际的生产活动,是项目管理的经典问题。 在一个复杂的 阅读全文
posted @ 2021-10-18 17:20 Mars.wang 阅读(487) 评论(0) 推荐(0)
摘要: 参考: https://zhuanlan.zhihu.com/p/54084335 https://zhuanlan.zhihu.com/p/54102723 https://www.cnblogs.com/nullzx/p/8729425.html B+树是在B-树的基础上修改得来,比B-树更简单 阅读全文
posted @ 2021-10-13 17:05 Mars.wang 阅读(166) 评论(0) 推荐(0)
摘要: 参考: https://zhuanlan.zhihu.com/p/143396578 https://zhuanlan.zhihu.com/p/139907457 https://www.jianshu.com/p/e136ec79235c 红黑树的五条性质: 1. 结点是红色或黑色。 2. 根结点 阅读全文
posted @ 2021-10-11 14:13 Mars.wang 阅读(172) 评论(0) 推荐(0)
摘要: AVL树是平衡性要求非常高的二叉查找树,查找效率很高,也很复杂。 写完之后终于明白java的hashmap为什么用红黑树而不用AVL树了。 public class BinaryAVLTree<K extends Comparable<K>> { private AVLNode<K> root; p 阅读全文
posted @ 2021-10-11 11:18 Mars.wang 阅读(237) 评论(0) 推荐(0)
摘要: /** * 队列,先进先出 * 头指针永远指向第一个元素 * 尾指针永远指向最后一个元素的后一个位置 * 所有10个容量的数组构成的队列最多容纳9个元素 * * @param <T> */ public class MQueue<T> { private final int length = 10; 阅读全文
posted @ 2021-10-09 14:45 Mars.wang 阅读(313) 评论(0) 推荐(0)
摘要: java实现双向链表 public class MLinkedList<T> { //元素个数 private int size = 0; //头指针 private Node<T> first; //尾指针 private Node<T> last; @Data @AllArgsConstruct 阅读全文
posted @ 2021-10-09 14:20 Mars.wang 阅读(360) 评论(0) 推荐(0)
摘要: java实现小顶堆,堆是优先队列的底层数据结构 import com.google.common.collect.Lists; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; impor 阅读全文
posted @ 2021-10-09 13:21 Mars.wang 阅读(175) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 81 下一页