摘要: 460. LFU Cache Hard Design and implement a data structure for a Least Frequently Used (LFU) cache. Implement the LFUCache class: LFUCache(int capacity 阅读全文
posted @ 2022-01-05 09:35 xiaoyongyong 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 560. Subarray Sum Equals K Medium Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals t 阅读全文
posted @ 2022-01-02 10:13 xiaoyongyong 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 31. Next Permutation Medium Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If su 阅读全文
posted @ 2021-12-29 00:28 xiaoyongyong 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1.http1 每次建立tcp连接发送/接受一次 2.http1.1 每次建立tcp连接可以发送/接受多次,但是必须是一发一收,也就是上一个request没有收到回应前无法发送下一个request 3.http2 在http1.1基础上增加了stream机制,可以同时发送多个request,然后等待 阅读全文
posted @ 2021-12-28 03:58 xiaoyongyong 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 18. 4Sum Medium Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= 阅读全文
posted @ 2021-12-26 05:35 xiaoyongyong 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 基本概念: 什么是kafka:其实就是一个分布式的消息队列. 消息(message):把各个应用给kafka发送的内容称之为消息. topic 和 partitions: topic:不同类的消息被氛围不同的topic,一个topic类似于数据库的一个表. partition:a56爆大奖在线娱乐topic可以被分 阅读全文
posted @ 2021-12-25 04:34 xiaoyongyong 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 207. Course Schedule Medium There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequ 阅读全文
posted @ 2021-12-20 02:34 xiaoyongyong 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 743. Network Delay Time Medium You are given a network of n nodes, labeled from 1 to n. You are also given times, a list of travel times as directed e 阅读全文
posted @ 2021-12-19 01:44 xiaoyongyong 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 最小生成树(minimum spanning tree)的3种解法: 稀疏图:1>Prim PQ implementation O(ElogV) 2>Kruskal implementationm (ElogV) 稠密图:Prim Naive implementation O(V2) Minimum 阅读全文
posted @ 2021-12-16 12:44 xiaoyongyong 阅读(123) 评论(0) 推荐(0) 编辑
摘要: mocket 中常用操作的代码和注解对等操作 相关对等操作 code anotation note @Beforepublic void init() {MockitoAnnotations.initMocks(this);} @RunWith(MockitoJUnitRunner.class)pu 阅读全文
posted @ 2021-12-13 06:11 xiaoyongyong 阅读(177) 评论(0) 推荐(0) 编辑