上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 41 下一页
摘要: leetcode topK频率词 class Solution { public int[] topKFrequent(int[] nums, int k) { int[] result = new int[k]; HashMap<Integer, Integer> map = new HashMa 阅读全文
posted @ 2022-10-23 10:50 Chenyi_li 阅读(57) 评论(0) 推荐(0)
摘要: 自己版: package leetcode.mySort; public class QuickSort { public static int partition(int[] array,int start,int end){ int base = array[start]; while (sta 阅读全文
posted @ 2022-10-22 19:51 Chenyi_li 阅读(27) 评论(0) 推荐(0)
摘要: 能者多劳模式 转载:https://www.bilibili.com/video/BV1dE411K7MG?p=7&vd_source=46d50b5d646b50dcb2a208d3946b1598 阅读全文
posted @ 2022-10-16 19:33 Chenyi_li 阅读(15) 评论(0) 推荐(0)
摘要: Redis各种数据结构分别适合什么 String:验证码、订单号、分布式session Hash:购物车 List:实现消息队列(不常见) Set:抽奖活动、点赞 Zset:排行榜、热搜 超买超卖问题(项目并不是秒杀呀) 库存问题 转载链接:https://www.nowcoder.com/disc 阅读全文
posted @ 2022-10-15 15:46 Chenyi_li 阅读(18) 评论(0) 推荐(0)
摘要: 某个线程是否锁住同步资源 悲观锁每次拿资源时候都认为会有人修改,在读数据的时候都会上锁,其他线程就会阻塞直到拿到锁。 乐观锁是每次拿到数据的时候,都假设别人不会修改,都不会上锁。只有在更新数据的时候,去判断之前有没有线程更新了这个数据。如果这个数据没有更新过。当前线程就会将自己修改的线程成功写入。如 阅读全文
posted @ 2022-10-14 21:08 Chenyi_li 阅读(88) 评论(0) 推荐(0)
摘要: 自己造轮子 class LRUCache { // 题根据目要求函数 get 和 put 必须以 O(1) 的平均时间复杂度运行,所以一定需要用到HashMap。 // 同时,需要删除最久未使用,也就是说需要保留顺序,需要用到队列,并且插入删除复杂度O(1),所以需要用到链表(双向)实现的队列 // 阅读全文
posted @ 2022-10-14 16:45 Chenyi_li 阅读(18) 评论(0) 推荐(0)
摘要: 参考视频:https://www.bilibili.com/video/BV1EV4y1Z7zg/?spm_id_from=333.999.0.0&vd_source=46d50b5d646b50dcb2a208d3946b1598 jvm的理解和组成部分 jvm主要有三个核心部分,第一个是类加载的 阅读全文
posted @ 2022-10-12 21:53 Chenyi_li 阅读(31) 评论(0) 推荐(0)
摘要: 转载:https://blog.csdn.net/weixin_46217160/article/details/108743389 https://www.cnblogs.com/linyufeng/p/9671844.html https://www.xiaolincoding.com/os/4 阅读全文
posted @ 2022-10-10 21:54 Chenyi_li 阅读(18) 评论(0) 推荐(0)
摘要: 单例模式看这个视频就够了:https://www.bilibili.com/video/BV1jg411k7td/?spm_id_from=333.337.search-card.all.click&vd_source=46d50b5d646b50dcb2a208d3946b1598 单例模式是一种 阅读全文
posted @ 2022-10-09 21:44 Chenyi_li 阅读(17) 评论(0) 推荐(0)
摘要: docker run -d -p 8083(宿主机):8080(docker容器的端口) --name tomcat01 tomcat:8.0 整理自:https://www.bilibili.com/video/BV1wQ4y1Y7SE?p=7&vd_source=46d50b5d646b50dc 阅读全文
posted @ 2022-10-09 15:35 Chenyi_li 阅读(21) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 41 下一页