结点leetcode 19
[LeetCode][279]perfect-squares
# Content Given an integer n, return the least number of perfect square numbers that sum to n. A perfect square is an integer that is the square of an ......
leetcode236求最近公共祖先
递归 TreeNode* dfs(TreeNode* root,TreeNode* p,TreeNode* q){ if(!root)return root;//当发现这个节点已经是叶节点时,要告诉上层 if(root==p||root==q)return root;//当发现是p节点或者q时也要告 ......
Leetcode1636——按照频率将数组升序排序
给你一个整数数组 nums ,请你将数组按照每个值的频率 升序 排序。如果有多个值的频率相同,请你按照数值本身将它们 降序 排序。 请你返回排序后的数组。 示例 1: 输入:nums = [1,1,2,2,2,3] 输出:[3,1,1,2,2,2] 解释:'3' 频率为 1,'1' 频率为 2,'2 ......
【LeetCode动态规划#16】矩阵的最小路径和、三角形的最小路径和
### 矩阵的最小路径和 给定一个包含非负整数的 `*m* x *n*` 网格 `grid` ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。 **说明:**一个机器人每次只能向下或者向右移动一步。 **示例 1:** ``` 输入:grid = [[1,3,1],[1,5,1],[ ......
[LeetCode][221]maximal-square
# Content Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example 1: Input: mat ......
Red Hat8.8 安装 Oracle19C,配置开机自动启动,创建数据库,调整内核参数
## 1. 下载rpm包 * oracle-database-ee-19c-1.0-1.x86_64.rpm ## 2. 上传rpm包 * 上传下载的rpm包到响应目录,例如: /home ## 3.安装依赖 * 上传 compat-libcap1-1.10-7.el7.x86_64.rpm 和 c ......
[LeetCode][198]house-robber
# Content You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint s ......
【LeetCode动态规划#15】最长公共子序列II
### 最长公共子序列(二) #### 描述 给定两个字符串str1和str2,输出两个字符串的最长公共子序列。如果最长公共子序列为空,则返回"-1"。目前给出的数据,仅仅会存在一个最长的公共子序列 数据范围:0≤∣���1∣,∣���2∣≤20000≤∣*s**t**r*1∣,∣*s**t**r* ......
70th 2023/8/19 模拟赛总结53
#### 本次 赛完就被拉走去听讲了,来补救一下总结 这次依旧爆炸,却没有完全炸裂,110pts,暴力没拿完,试图切掉T3,失败,~~事后发现离正解很近~~ 然后暴力分没拿完,T2还有10分,但为了打T3只拿了20,结果T3只拿了和暴力相同的分,最后比全暴力分都低 没法不服,因为自己得承担失误 还是 ......
【LeetCode1】统计参与通信的服务器
# 【题目】 - 这里有一幅服务器分布图,服务器的位置标识在 `m * n` 的整数矩阵网格 `grid` 中,1 表示单元格上有服务器,0 表示没有。 - 如果两台服务器位于同一行或者同一列,我们就认为它们之间可以进行通信。 - 请你统计并返回能够与至少一台其他服务器进行通信的服务器的数量。 # ......
Parallels Desktop 19 Mac虚拟机 V19.0.0中文版
Parallels Desktop 19激活版是一款专为Mac用户设计的虚拟机软件。它允许用户在Mac上同时运行多个操作系统,如Windows、Linux和其他版本的Mac OS。Parallels Desktop 19下载具有许多强大的功能和改进,使其成为Mac用户的理想选择。 点击获取Paral ......
[LeetCode][152]maximum-product-subarray
# Content Given an integer array nums, find a subarray that has the largest product, and return the product. The test cases are generated so that the ......
[LeetCode][139]word-break
# Content Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dict ......
Leetcode——1957、删除字符使字符串变好
一个字符串如果没有 三个连续 相同字符,那么它就是一个 好字符串 。 给你一个字符串 s ,请你从 s 删除 最少 的字符,使它变成一个 好字符串 。 请你返回删除后的字符串。题目数据保证答案总是 唯一的 。 示例 1: 输入:s = "leeetcode" 输出:"leetcode" 解释: 从第 ......
[LeetCode][124]binary-tree-maximum-path-sum
# Content A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can onl ......
Leetcode 1. 两数之和(Two sum)
[题目链接🔗](https://leetcode.cn/problems/two-sum) 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素 ......
oracle 11C升到 Oracle 19C web项目所需要做的操作、遇到的问题以及解决
此次记录问题为Oracle数据库升级版本跨度过大所以导致项目里运用的ojdbc.jar不匹配,当前项目框架是比较老的所以数据版本升级以及tomcat、jdk的版本是否相匹配是我们在做升级之前就要考虑清楚和搞清楚的 这次是被动通知,所以临时查询升级相关问题,好在我们的db给介绍了一个关于Oracle的 ......
[LeetCode] 1267. Count Servers that Communicate
You are given a map of a server center, represented as a m * n integer matrix grid, where 1 means that on that cell there is a server and 0 means that ......
Leetcode 1782. 统计点对的数目
这两天实训比较忙,之后补 TRANSLATE with x English Arabic Hebrew Polish Bulgarian Hindi Portuguese Catalan Hmong Daw Romanian Chinese Simplified Hungarian Russian ......
leetcode 12
 ### 算法介绍: - **哈希** - **贪心** - 实现代码如下 ```cpp class S ......
Leetcode605——种花问题
假设有一个很长的花坛,一部分地块种植了花,另一部分却没有。可是,花不能种植在相邻的地块上,它们会争夺水源,两者都会死去。 给你一个整数数组 flowerbed 表示花坛,由若干 0 和 1 组成,其中 0 表示没种植花,1 表示种植了花。另有一个数 n ,能否在不打破种植规则的情况下种入 n 朵花? ......
Leetcode 202. 快乐数(Happy number)
[题目链接🔗](https://leetcode.cn/problems/happy-number) 编写一个算法来判断一个数 n 是不是快乐数。 「快乐数」 定义为: 对于一个正整数,每一次将该数替换为它每个位置上的数字的平方和。 然后重复这个过程直到这个数变为 1,也可能是 无限循环 但始终变 ......
pd 虚 拟 机 大更新!Parallels Desktop 19中文 pd19激 活
Parallels Desktop 19是一款强大的虚拟机软件,它允许用户在Mac上同时运行多个操作系统,如Windows、Linux和其他一些常见的操作系统。Parallels Desktop 19是一款功能丰富、性能优越的虚拟机软件,它为Mac用户提供了无缝运行多个操作系统的能力,同时提供了高级 ......
[LeetCode][121]best-time-to-buy-and-sell-stock
# Content You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a s ......
[LeetCode][96]unique-binary-search-trees
# Content Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 t ......
LeetCode 算法题解之 26 进制转换 All In One
LeetCode 算法题解之 26 进制转换 All In One
171. Excel Sheet Column Number
171. Excel 工作表列号
168. Excel Sheet Column Title
168. Excel 工作表列头 ......
Leetcode 459——重复的子字符串
给定一个非空的字符串 s ,检查是否可以通过由它的一个子串重复多次构成。 示例 1: 输入: s = "abab" 输出: true 解释: 可由子串 "ab" 重复两次构成。 示例 2: 输入: s = "aba" 输出: false 示例 3: 输入: s = "abcabcabcabc" 输出 ......
求二叉树中某结点的所有祖宗结点,该结点不唯一
利用非递归后序遍历的方法。 当匹配成功时,此时,栈中结点都是目标结点的祖宗结点。 目前有个小问题,会重复打印的祖宗结点,但是可以根据根节点判断有多少个目标结点 #include <stdio.h> #include <stdlib.h> #define MaxSize 100 typedef str ......
[LeetCode][72]edit-distance
# Content Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three ......
[LeetCode][85]maximal-rectangle
# Content Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1: In ......