上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 目录 1.LinkedHashMap的内部结构 2.LinkedHashMap构造函数 3.元素新增策略 4.元素删除 5.元素修改和查找 6.特殊操作 7.扩容 8.总结 1.LinkedHashMap的内部结构 对象的内部结构其实就是hashmap的内部结构,但是比hashmap的内部结构nod 阅读全文
posted @ 2019-09-03 17:05 cutter_point 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1.hashtable的内部结构 基础存储数据的hash桶由Entry结构的数组存放而entry数据结构,有hash,key和value,还有一个指向下一个节点的引用next对象 这里就和hashmap中的数据结构不一样了,hashmap中的数据结构是node,虽然结构上差不多,但是setvalue 阅读全文
posted @ 2019-08-27 17:24 cutter_point 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 1.hashmap的底层数据结构 众所皆知map的底层结构是类似邻接表的结构,但是进入1.8之后,链表模式再一定情况下又会转换为红黑树在JDK8中,当链表长度达到8,并且hash桶容量超过64(MIN_TREEIFY_CAPACITY),会转化成红黑树,以提升它的查询、插入效率底层哈希桶的数据结构是 阅读全文
posted @ 2019-08-22 18:58 cutter_point 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 关于LinkedList的源码关注点 1.从底层数据结构,扩容策略2.LinkedList的增删改查3.特殊处理重点关注4.遍历的速度,随机访问和iterator访问效率对比 1.从底层数据结构,扩容策略 构造函数不做任何操作,只要再add的时候进行数据初始化操作,以操作推动逻辑,而且linkedl 阅读全文
posted @ 2019-08-16 18:03 cutter_point 阅读(200) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.dynamicprogramming.easy; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.dynamicprogramming.easy * @ClassName: Rob * @Author: xiaof * @Description: 198. House Robb 阅读全文
posted @ 2019-08-16 10:11 cutter_point 阅读(220) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.dynamicprogramming.medium; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.dynamicprogramming.medium * @ClassName: NumDecodings * @Author: xiaof * @Descript... 阅读全文
posted @ 2019-08-15 18:06 cutter_point 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 我被这些题整哭了,你呢??? 日了狗啊。。。。。。 好难啊。。。。 按照这个样子搞,不用找工作了,回家放牛去。。。。。。。 阅读全文
posted @ 2019-08-13 11:25 cutter_point 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 关于ArrayList的源码关注点 1.从底层数据结构,扩容策略2.ArrayList的增删改查3.特殊处理重点关注4.遍历的速度,随机访问和iterator访问效率对比 1.从底层数据结构,扩容策略 对于第一个问题,底层即时一个object的数组,用来存放动态数据: transient Objec 阅读全文
posted @ 2019-08-09 09:01 cutter_point 阅读(162) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.str.hard; import java.util.Stack; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.str.hard * @ClassName: LongestValidParentheses * @Author: xiaof * @Descri... 阅读全文
posted @ 2019-08-07 16:25 cutter_point 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 今天的字符类还比较简单 阅读全文
posted @ 2019-08-04 18:04 cutter_point 阅读(292) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.LinkedList.medium; import y2019.Algorithm.LinkedList.ListNode; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.LinkedList.medium * @ClassName: AddTwoNumbers ... 阅读全文
posted @ 2019-08-01 10:54 cutter_point 阅读(179) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array.hard; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array.hard * @ClassName: MaximalRectangle * @Author: xiaof * @Description: TODO 85. Maximal Rect... 阅读全文
posted @ 2019-07-29 10:13 cutter_point 阅读(202) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array.medium; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array.medium * @ClassName: Trap * @Author: xiaof * @Description: TODO 42. Trapping Rain Water ... 阅读全文
posted @ 2019-07-25 10:28 cutter_point 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 这几天一直再想这样刷题真的有必要么,这种单纯的刷题刷得到尽头么??? 这种出题的的题目是无限的随便百度,要多少题有多少题,那么我这一直刷的意义在哪里??? 最近一直苦苦思考,不明所以,刷题刷得更多的感受是机械化的操作。 抽空看了以前乔布斯的演讲有点感受,经过几天的思考最终我想通了。 这里刷题是对自己 阅读全文
posted @ 2019-07-24 10:17 cutter_point 阅读(147) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array.medium; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array.medium * @ClassName: SortColors * @Author: xiaof * @Description: TODO 75. Sort Colors *... 阅读全文
posted @ 2019-07-19 11:10 cutter_point 阅读(206) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array.medium; import java.util.*; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array.medium * @ClassName: CombinationSum * @Author: xiaof * @Description... 阅读全文
posted @ 2019-07-18 10:48 cutter_point 阅读(173) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array.medium; import java.util.Arrays; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array.medium * @ClassName: 阅读全文
posted @ 2019-07-17 11:50 cutter_point 阅读(190) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array.medium; import java.util.ArrayList; import java.util.List; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array.medium * @ClassName: PancakeSort * @A... 阅读全文
posted @ 2019-07-16 09:58 cutter_point 阅读(194) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array.medium; /** * @ClassName UniquePathsWithObstacles * @Description TODO 63. Unique Paths II * * A robot is located at the top-left corner of a m x n grid (marked 'Sta... 阅读全文
posted @ 2019-07-15 23:15 cutter_point 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 第950题,这题我是真的没想到居然会说使用队列去做,大神的答案,拿过来瞻仰一下 阅读全文
posted @ 2019-07-15 11:58 cutter_point 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 数组类,简单级别完结。。。。 不容易啊,基本都是靠百度答案。。。。 希望做过之后后面可以自己复习,自己学会这个解法 阅读全文
posted @ 2019-07-12 10:20 cutter_point 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 真的感觉有点难。。。 这还是简单级别。。。 我也是醉了 阅读全文
posted @ 2019-07-11 23:44 cutter_point 阅读(378) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array * @ClassName: IsOneBitCharacter * @Author: xiaof * @Description: TODO 717. 1-bit and 2-bit Char... 阅读全文
posted @ 2019-07-11 00:05 cutter_point 阅读(197) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array; /** * @ClassName FindUnsortedSubarray * @Description TODO 581. Shortest Unsorted Continuous Subarray * * Given an integer array, you need to find one continuous s... 阅读全文
posted @ 2019-07-09 22:42 cutter_point 阅读(227) 评论(0) 推荐(0) 编辑
摘要: package y2019.Algorithm.array; import java.util.HashSet; import java.util.Set; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array * @ClassName: FairCandySwap * @Author: xiaof *... 阅读全文
posted @ 2019-07-09 14:51 cutter_point 阅读(261) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页