结点leetcode 19
[LeetCode] 2178. Maximum Split of Positive Even Integers
You are given an integer finalSum. Split it into a sum of a maximum number of unique positive even integers. For example, given finalSum = 12, the fol ......
[LeetCode] 2600. K Items With the Maximum Sum
There is a bag that consists of items, each item has a number 1, 0, or -1 written on it. You are given four non-negative integers numOnes, numZeros, n ......
Leetcode: Algorithm
1. Boyer-Moore Voting Algorithm identify the majority element (frequency > n/2) class Solution { public int majorityElement(int[] nums) { int count = ......
leetcode-1652-easy
Defuse the Bomb ``` You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n ......
leetcode-1629-easy
Slowest Key ``` You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n and ......
LeetCode 160. 相交链表
``` /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class ......
【笔试实战】LeetCode题单刷题-编程基础 0 到 1【三】
博客推行版本更新,成果积累制度,已经写过的博客还会再次更新,不断地琢磨,高质量高数量都是要追求的,工匠精神是学习必不可少的精神。因此,大家有何建议欢迎在评论区踊跃发言,你们的支持是我最大的动力,你们敢投,我就敢肝 ......
19-知识图谱在反欺诈中的应用
19.知识图谱在反欺诈中的应用 知识图谱的应用价值 19.1知识图谱的应用 (1)对多源异构数据和多维复杂关系的处理与可视化展示: 将人类社会生活与生产活动中难以用数学模型直接表示的关联属性,利用语义网络和专业领域知识进行组织存储,形成一张以关系为纽带的数据网络,通过对关系的挖掘与分析,能够找到隐藏 ......
leetcode207 课程表(拓扑排序)
public boolean canFinish(int numCourses, int[][] prerequisites) { //每个点的入度 int[] d = new int[numCourses]; //邻接表定义 ArrayList<ArrayList<Integer>> list = ......
Leetcode155. 最小栈
``` class MinStack { public: stack st; multiset s; MinStack() { } void push(int val) { st.push(val); s.insert(val); } void pop() { int val=st.top(); s ......
图-邻接表-leetcode207
你这个学期必须选修 numCourses 门课程,记为 0 到 numCourses - 1 。 在选修某些课程之前需要一些先修课程。 先修课程按数组 prerequisites 给出,其中 prerequisites[i] = [ai, bi] ,表示如 ......
[LeetCode] 2679. Sum in a Matrix
You are given a 0-indexed 2D integer array nums. Initially, your score is 0. Perform the following operations until the matrix becomes empty: From eac ......
读发布!设计与部署稳定的分布式系统(第2版)笔记19_基础层之设备
 # 1. 物理主机 ## 1.1. 以前数据中心硬件就是建立在单个物理机器的高可靠性上的 ## 1.2. 如今通过 ......
LeetCode/公平分发饼干
给你一个整数数组 cookies ,其中 cookies[i] 表示在第 i 个零食包中的饼干数量。 另给你一个整数 k 表示等待分发零食包的孩子数量,所有 零食包都需要分发。在同一个零食包中的所有饼干都必须分发给同一个孩子,不能分开。 分发的 不公平程度 定义为单个孩子在分发过程中能够获得饼干的最 ......
LeetCode 周赛 352(2023/07/02)一场关于子数组的专题周赛
> **本文已收录到 [AndroidFamily](https://github.com/pengxurui/AndroidFamily),技术和职场问题,请关注公众号 [彭旭锐] 和 [BaguTree Pro] 知识星球提问。** - 往期回顾:[LeetCode 单周赛第 350 场 · 滑 ......
LeetCode 538. 把二叉搜索树转换为累加树
#题目链接:[LeetCode 538. 把二叉搜索树转换为累加树](https://leetcode.cn/problems/convert-bst-to-greater-tree/) ##题意: **给出二叉 搜索 树的根节点,该树的节点值各不相同,请你将其转换为累加树(Greater Sum ......
LeetCode 108. 将有序数组转换为二叉搜索树
#题目链接:[LeetCode 108. 将有序数组转换为二叉搜索树](https://leetcode.cn/problems/convert-sorted-array-to-binary-search-tree/) ##题意: **给你一个整数数组 nums ,其中元素已经按 升序 排列,请你将 ......
LeetCode 669. 修剪二叉搜索树
#题目链接:[LeetCode 669. 修剪二叉搜索树](https://leetcode.cn/problems/trim-a-binary-search-tree/) ##题意: **给你二叉搜索树的根节点 root ,同时给定最小边界low 和最大边界 high。通过修剪二叉搜索树,使得所有 ......
LeetCode 450. 删除二叉搜索树中的节点
#题目链接:[LeetCode 450. 删除二叉搜索树中的节点](https://leetcode.cn/problems/delete-node-in-a-bst/) ##题意: **给定一个二叉搜索树的根节点 root 和一个值 key,删除二叉搜索树中的 key 对应的节点,并保证二叉搜索树 ......
IDEA安装leetcode插件
1.在idea的Settings-Plugins-BrowseRepositories搜索leetcode。如图: 安装完成后,重启idea。 2.Idea的Tools下出现leetcode plugin: 设置leetcode官网的登录名和密码,设置TempFilePath这里设置为新建项目的路径 ......
LeetCode 235. 二叉搜索树的最近公共祖先
#题目链接:[LeetCode 235. 二叉搜索树的最近公共祖先](https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-search-tree/description/) ##题意: **给定一个二叉搜索树, 找到该树中两 ......
LeetCode 701. 二叉搜索树中的插入操作
#题目链接:[LeetCode 701. 二叉搜索树中的插入操作](https://leetcode.cn/problems/insert-into-a-binary-search-tree/) ##题意: **给定二叉搜索树(BST)的根节点 root 和要插入树中的值 value ,将值插入二叉 ......
LeetCode 236. 二叉树的最近公共祖先
#题目链接:[LeetCode 236. 二叉树的最近公共祖先](https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-tree/description/) ##题意: **给定一个二叉树, 找到该树中两个指定节点的最近公共祖 ......
19cRAC更换ocr_votingdisk所在的磁盘组
0. 需求OCR和Votingdisk目前存放在+DG_GRID磁盘组中,计划将OCR和Votingdisk临时迁移至+DG_DATA磁盘组,然后重建+DG_GRID磁盘组,等+DG_GRID磁盘组重建完成后,再将OCR和Votingdisk最终迁移回+DG_GRID磁盘组1. 磁盘组信息[grid ......
HTTP 错误 500.19 - Internal Server Error
将"启用32位应用程序"更改为true后,网站报错: 解决此问题的方法是从iis管理器中删除以下模块: 1)DynamicCompressionModule2)StaticCompressionModule 为此,请在iis管理器中执行以下步骤: 步骤1:iis主页-模块-解锁这两个模块步骤2:网站 ......
(Leetcode)746
```java // 方式一:第一步不支付费用 class Solution { public int minCostClimbingStairs(int[] cost) { int len = cost.length; int[] dp = new int[len + 1]; // 从下标为 0 ......
leetcode 26. 删除有序数组中的重复项
## 直接法 ```java public int removeDuplicates(int[] nums) { if (nums == null) { return -1; } boolean start = false; int nextIndex = 1; for (int i = 1; i ......
leetcode 22. 括号生成
## 暴力枚举 ```java class Solution { public List generateParenthesis(int n) { List list = getAll(2 * n); List result = new ArrayList(); for (String item : ......
LeetCode 152. 乘积最大子数组
``` class Solution { public: static const int N=20010; int f[N],g[N]; int maxProduct(vector& nums) { int n=nums.size(); int res=nums[0]; f[0]=g[0]=num ......
【leetcode】【剑指 Offer 06】【从尾到头打印链表】
# c++ ## 第一个方法 ```c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) ......