上一页 1 2 3 4 5 6 7 8 ··· 32 下一页
摘要: 1、rocketMq延迟消息实现: 1) producer要将一个延迟消息发送到某个Topic中 2) Broker判断这是一个延迟消息后,将其存到SCHEDULE_TOPIC_XXXX中,延迟消息有18个延迟级别,所以SCHEDULE_TOPIC_XXXX中有18个队列 3) Broker内部通过 阅读全文
posted @ 2023-03-20 23:13 MarkLeeBYR 阅读(42) 评论(0) 推荐(0)
摘要: Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = 阅读全文
posted @ 2023-03-20 11:38 MarkLeeBYR 阅读(23) 评论(0) 推荐(0)
摘要: 给定一棵二叉树,你需要计算它的直径长度。一棵二叉树的直径长度是任意两个结点路径长度中的最大值。这条路径可能穿过也可能不穿过根结点。 public class Solution { int max = 0; public int diameterOfBinaryTree(TreeNode root) 阅读全文
posted @ 2023-03-17 16:56 MarkLeeBYR 阅读(20) 评论(0) 推荐(0)
摘要: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
posted @ 2023-03-16 19:20 MarkLeeBYR 阅读(38) 评论(0) 推荐(0)
摘要: You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o 阅读全文
posted @ 2023-03-16 19:17 MarkLeeBYR 阅读(28) 评论(0) 推荐(0)
摘要: 给你一个含 n 个整数的数组 nums ,其中 nums[i] 在区间 [1, n] 内。请你找出所有在 [1, n] 范围内但没有出现在 nums 中的数字,并以数组的形式返回结果。 输入:nums = [4,3,2,7,8,2,3,1]输出:[5,6] public List<Integer> 阅读全文
posted @ 2023-03-16 19:10 MarkLeeBYR 阅读(23) 评论(0) 推荐(0)
摘要: public TreeNode insertNode(TreeNode root, TreeNode node) { // write your code here if(root == null){ return node; } if(root.val > node.val){ //这个树里面没有 阅读全文
posted @ 2023-03-16 19:07 MarkLeeBYR 阅读(21) 评论(0) 推荐(0)
摘要: 给定两个字符串 s 和 p,找到 s 中所有 p 的 异位词 的子串,返回这些子串的起始索引。不考虑答案输出的顺序。 异位词 指由相同字母重排列形成的字符串(包括相同的字符串)。 输入: s = "cbaebabacd", p = "abc"输出: [0,6]解释:起始索引等于 0 的子串是 "cb 阅读全文
posted @ 2023-03-16 17:58 MarkLeeBYR 阅读(27) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/MarkLeeBYR/p/17166229.html 阅读全文
posted @ 2023-03-16 17:46 MarkLeeBYR 阅读(21) 评论(0) 推荐(0)
摘要: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2023-03-16 17:22 MarkLeeBYR 阅读(33) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 32 下一页