算法leetcode day 30

[LeetCode][62]unique-paths

# Content There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the ......
unique-paths LeetCode unique paths 62

[LeetCode][42]trapping-rain-water

# Content Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raini ......

[LeetCode][10]regular-expression-matching

# Content Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where: '.' Matches any single ch ......

[LeetCode][32]longest-valid-parentheses

# Content Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring. Examp ......

[LeetCode][64]minimum-path-sum

# Content Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along ......
minimum-path-sum LeetCode minimum path sum

双指针算法

# 双指针算法 ```c++ for(int i=0, j=0; i using namespace std; const int N = 100010; int a[N], s[N];//s数组用来判断 j ~ i 之间有没有重复的 int main(){ int n; cin>>n; for(i ......
指针 算法

LeetCode[10]RegularExpressionMatching

# Content Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where: '.' Matches any single ch ......
RegularExpressionMatching LeetCode 10

LeetCode[32]LongestValidParentheses

# Content Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring. Examp ......
LongestValidParentheses LeetCode 32

LeetCode[42]TrappingRainWater

# Content Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raini ......
TrappingRainWater LeetCode 42

LeetCode[53]MaximumSubarray

# Content Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Ou ......
MaximumSubarray LeetCode 53

LeetCode[62]UniquePaths

# Content There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the ......
UniquePaths LeetCode 62

LeetCode[55]JumpGame

# Content You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your ......
LeetCode JumpGame 55

LeetCode[64]MinimumPathSum

# Content Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along ......
MinimumPathSum LeetCode 64

算法复杂度速查表

https://zhuanlan.zhihu.com/p/158694568 目录 目录 1. 背景 2. Big-O Complexity Chart 3. Common Data Structure Operations 4. Array Sorting Algorithms 1. 背景 最近看 ......
复杂度 算法

JavaSE学习笔记day04

IO流概念: OS的文件系统: (1)文件:文本文件、视频文件、音频文件、图像文件、可执行文件等等,这些文件都是由一个个字节组成的。 (2)目录(文件夹):对文件进行归纳划分,将同类型的文件方法在同一个文件夹中,方便我们管理和使用。 (3)资源访问路径: 1)相对路径:相对于某一个文件夹而言,不包含 ......
笔记 JavaSE day 04

批量备份数据库日志且30天后自动删除该备份文件

```sql /******************************************* * 批量备份数据库日志且30天后自动删除该备份文件 *******************************************/ DECLARE @backupfile VARCHAR ......
备份 天后 数据库 文件 数据

30个shell脚本简单示例

30个简单且常用的Linux Shell脚本命令及示例,有用~~ 时代Java 2023-08-18 07:40 发表于北京 ↑ 点击上面 “时代Java”关注我们,关注新技术,学习新知识! shell一直是类Unix系统的本地命令行解释器。它已被证明是Unix的主要功能之一,并发展成为一个全新的主 ......
示例 脚本 shell

【LeetCode1270. 向公司CEO汇报工作的所有人】with recursive找到某节点所有的后代

# 题目地址 https://leetcode.cn/problems/all-people-report-to-the-given-manager/description/ # 代码 ``` WITH RECURSIVE cte_subordinates AS ( -- 基础情况: 找到直接下属 ......
节点 后代 recursive LeetCode 所有人

用户新增预测挑战赛(算法挑战大赛)

讯飞开放平台针对不同行业、不同场景提供相应的AI能力和解决方案,赋能开发者的产品和应用,帮助开发者通过AI解决相关实际问题,实现让产品能听会说、能看会认、能理解会思考。 用户新增预测是分析用户使用场景以及预测用户增长情况的关键步骤,有助于进行后续产品和应用的迭代升级。 本次大赛提供了讯飞开放平台海量... ......
挑战赛 算法 用户

基于CEM算法的三维点云数据二维映射表示matlab仿真

1.算法理论概述 三维点云数据是一种重要的空间信息表示方式,广泛应用于计算机视觉、机器人、虚拟现实等领域。然而,三维点云数据的特征维度往往很高,难以直接处理和分析。因此,将三维点云数据转换为低维度的二维映射表示,是一种有效的数据降维方法,可以方便地进行数据处理和分析。本文提出了一种基于CEM(con ......
算法 数据 matlab CEM

代码随想录算法训练营第二天| 977.有序数组的平方 ,209.长度最小的子数组 ,59.螺旋矩阵II

977.有序数组的平方 题目 给你一个按 非递减顺序 排序的整数数组 nums,返回 每个数字的平方 组成的新数组,要求也按 非递减顺序 排序。 第一想法 隐隐约约有印象是用双指针法头尾一起向中间移动,因为这个数组的特点决定了平方数中间小两边大 思路&题解 class Solution { publ ......
数组 随想录 训练营 矩阵 螺旋

【安全学习之路】Day43

![](https://img2023.cnblogs.com/blog/3073714/202308/3073714-20230817231317437-1280921868.png) ![](https://img2023.cnblogs.com/blog/3073714/202308/3073 ......
Day 43

【leetcode】1.two sum

第一题给我干懵了...想达到这个要求把我脑壳都想痛了...Follow-up: Can you come up with an algorithm that is less than O(n2) time complexity? 一开始想过用map,但是不能解决重复key的问题。 然而我用sort, ......
leetcode two sum

(全英语版)处理恶意软件的随机森林分类器算法(Random Forest Classifier On Malware)

Random Forest Classifier On Malware (copyright 2020 by YI SHA, if you want to re-post this,please send me an email:shayi1983end@gmail.com) (全英语版)处理恶意软 ......
算法 Classifier 恶意 森林 Malware

共识算法 ZAB

> ZAB 的作者说 ZAB 不是 Paxos,但后面我们又把 ZAB 归纳为 Paxos。我认为这两个说法都对,只是他们描述的时间不一致。在 ZAB诞生时,它解决了 Paxos 不能保证顺序执行的问题,从某些角度来说 ZAB 是要 Paxos 优秀的,说它不是 Paxos 也没问题。但是后来随来越 ......
共识 算法 ZAB

【算法学习笔记】DFN序求LCA(最近公共祖先)

## 前置知识 * DFN序:对一棵树进行深度优先搜索`DFS`得到的**结点序列**,即深度优先搜索`DFS`的访问顺序。该表述不一定严谨,建议百度 * ST表(Sparse Table,稀疏表) ## 算法概述 > ###引理 1.1 > 在 DFN序 中祖先一定出现后代之前。 考虑一树上的两个 ......
祖先 算法 笔记 DFN LCA

20天 hot 100 速通计划-day11

### 图论 #### [200. 岛屿数量](https://leetcode.cn/problems/number-of-islands/) 给你一个由 `'1'`(陆地)和 `'0'`(水)组成的的二维网格,请你计算网格中岛屿的数量。 岛屿总是被水包围,并且每座岛屿只能由水平方向和/或竖直方向 ......
hot 100 day 11

[代码随想录]Day20-二叉树part09

## 题目:[669. 修剪二叉搜索树](https://leetcode.cn/problems/trim-a-binary-search-tree/) ### 思路: 遍历到的值小于最小值,说明左子树里的所有节点都小于最小值,舍弃左子树。 遍历到的值大于最大值,说明右子树里的所有节点都大于最大值 ......
随想录 随想 代码 part Day

8.17 Day1

战绩:80+50+70+70=270 挂麻了 # T1 蒙德 枚举中心点,组合挑出 $j$ 条出边,形成一个 大小为$j$的星星 出题人题出错了,本来应该100的。据说是没有验题人。。。 # T2 璃月 一开始想的莫队$O(n^2) \rightarrow 50pts$,又想了想20pts顺着的部分 ......
8.17 Day1 Day 17

day03

随机读写: 每个打开的文件都有一个记录读写位置的指针,也称文件位置指针,对文件的读写时该指针会自动往后移动,因此顺序读写时无需操作 当需要去文件的任意位置进行读写时,才需要调整该指针的位置 标准IO: int fseek(FILE *stream, long offset, int whence); ......
day 03