leetcode removing string stars

7-008-(LeetCode- 300) 最长递增子序列

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
序列 LeetCode 008 300

7-014-(LeetCode- 718) 最长重复子数组

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
数组 LeetCode 014 718

7-011-(LeetCode- 337) 打家劫舍Ⅲ

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
打家劫舍 LeetCode 011 337

7-012-(LeetCode- 416) 分割等和子集

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
子集 LeetCode 012 416

7-009-(LeetCode- 309) 最佳买卖股票时机含冷冻期

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
时机 LeetCode 股票 009 309

7-003-(LeetCode- 62) 不同路径

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
路径 LeetCode 003 62

7-004-(LeetCode- 64) 最小路径和

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
路径 LeetCode 004 64

7-002-(LeetCode- 5) 最长回文子串

1. 题目 读题 考查点 2. 解法 思路 代码逻辑 具体实现 1 1 3. 总结 ......
回文 LeetCode 002

LeetCode/移动石子直到连续

###1. 移动石子直到连续(三个石子) class Solution { public: vector<int> numMovesStones(int a, int b, int c) { int x = min({a, b, c}); int z = max({a, b, c}); int y ......
石子 LeetCode

[LeetCode] 1033. Moving Stones Until Consecutive

There are three stones in different positions on the X-axis. You are given three integers a, b, and c, the positions of the stones. In one move, you p ......
Consecutive LeetCode Moving Stones Until

leetcode_D10_136只出现一次的数字

1.题目 2.解一 leetcode官方解法,主要用到了两个知识:第一个是reduce函数,需要注意的是在python3中,需要 通过“ from functools import reduce ”从模块中调用该函数;第二个知识是位运算中的异或运算,主要有以下计算法则。 有了这两个补充知识,该题目就 ......
leetcode_D leetcode 数字 136 10

4-28打卡c++ string容器

1 #include<iostream> 2 #include<string> 3 using namespace std; 4 //assign 5 void test01() 6 { 7 string str1; 8 //截取三个字符 9 str1.assign("hello,world", 3 ......
容器 string 28

C++ 中 string自带的find()详解

首先find()函数存在于string对象中,对于任何一个string类对象都自带find函数,这意味着我们可以对find函数进行重载。 find()一共可传七个参数,但是常用的的只有四种情况: 对于C++98来说: string(1) 传入两个参数,一个是对另一string对象的常引用,一是开始查 ......
string find

2023-04-28 LeetCode精选题目20道附我的Java实现

LeetCode精选题目20道 1.56.合并区间 贪心 给出一个区间的集合,请合并所有重叠的区间。 示例 1: 输入: intervals = [[1,3],[2,6],[8,10],[15,18]] 输出: [[1,6],[8,10],[15,18]] 解释: 区间 [1,3] 和 [2,6] ......
LeetCode 题目 2023 Java 04

C语言刷leetcode——并查集

概述 https://leetcode.cn/problems/number-of-provinces/solution/python-duo-tu-xiang-jie-bing-cha-ji-by-m-vjdr/ 基本概念 并查集是一种数据结构 并查集这三个字,一个字代表一个意思。 并(Union ......
leetcode 语言

类型转换: list string

/* 一: str -> list 二: list -> str 1 list元素全为str 2 list元素不全为str */ 一: str -> list if __name__ == '__main__': str1 = "12345" print(list(str1)) # ['1', '2 ......
类型 string list

vscode-leetcode

vscode 里写 leetcode 需要的插件xavier-cai.vscode-leetcode-cpp-debug, leetcode.vscode-leetcode LeetCode C++ Debugger.Delete Temporary Contents置为false ctrl+shi ......
vscode-leetcode leetcode vscode

string_agg聚合函数

string_agg()是一个聚合函数,把一个个字符串用指定的数据进行分隔 -- 请按照城市进行汇总,每个城市只有一行记录,记录内容为将每个城市中的所有当地客户的lastname用逗号连接 --string_agg是一个聚合函数 select a.City, string_agg(c.LastNam ......
string_agg 函数 string agg

LeetCode 241 为运算表达式设计优先级

LeetCode | 241.为运算表达式设计优先级 给你一个由数字和运算符组成的字符串 expression ,按不同优先级组合数字和运算符,计算并返回所有可能组合的结果。你可以 按任意顺序 返回答案。 生成的测试用例满足其对应输出值符合 32 位整数范围,不同结果的数量不超过 104 。 示例 ......
优先级 表达式 LeetCode 241

NC50428 数星星 Stars

题目链接 题目 题目描述 天空中有一些星星,这些星星都在不同的位置,每个星星有个坐标。如果一个星星的左下方(包含正左和正下)有k颗星星,就说这颗星星是k级的。 例如,上图中星星5是3级的(1,2,4在它左下),星星2,4是1级的。例图中有1个0级,2个1级,1个2级,1个3级的星星。 给定星星的位置 ......
星星 50428 Stars NC

【二分查找】LeetCode 153. 寻找旋转排序数组中的最小值

题目链接 153. 寻找旋转排序数组中的最小值 思路 首先分析一下旋转数组可能有的状态: 左 < 中 < 右,此时最小值肯定在左边,应当收缩右边界 左 < 中,中 > 右,此时最小值肯定在右半段,应当收缩左边界 左 > 中,中 < 右,此时最小值肯定在左半段,应当收缩右边界 分析这三种状态可以发现, ......
数组 LeetCode 153

[LeetCode] 1031. Maximum Sum of Two Non-Overlapping Subarrays

Given an integer array nums and two integers firstLen and secondLen, return the maximum sum of elements in two non-overlapping subarrays with lengths  ......

LeetCode 双指针

15. 三数之和 (为0) 下标不能是重复的,必定右 i<l<r 1、先对数组排序(从小到大) 2、外层 i 遍历 如果 nums[i] > 0 ,整个 nums[] 后面的必定无法有三元组为0(排过序了,后面的 nums[l] nums[r] 都会大于0)。break。 如果 nums[i] = ......
指针 LeetCode

【LeetCode动态规划#14】子序列系列题(最长递增子序列、最长连续递增序列、最长重复子数组、最长公共子序列)

最长递增子序列 力扣题目链接(opens new window) 给你一个整数数组 nums ,找到其中最长严格递增子序列的长度。 子序列是由数组派生而来的序列,删除(或不删除)数组中的元素而不改变其余元素的顺序。例如,[3,6,2,7] 是数组 [0,3,1,6,2,2,7] 的子序列。 示例 1 ......
序列 数组 LeetCode 动态 14

【哈希表】LeetCode 895. 最大频率栈

题目链接 895. 最大频率栈 思路 很容易想到使用 map:valToFreq 来记录每个值出现的频率,这是没问题的,但关键是如何通过频率寻找到应该返回的数。 这时候我想到再加一个 map:freqToVal 来记录每个频率中出现的数字,为了符合题目返回最接近栈顶的元素的要求,freqToVal ......
频率 LeetCode 895

Incorrect credentials:401 Unauthorized, Please remove invalid credentials manually

https://blog.csdn.net/qq_32486163/article/details/109826697?utm_medium=distribute.pc_relevant.none-task-blog-title-7&spm=1001.2101.3001.4242 ......

代码随想录Day38-Leetcode509. 斐波那契数,70. 爬楼梯,746. 使用最小花费爬楼梯

咳咳, 因为找实习+摆导致时间被浪费大半; 先从动态规划学起吧,之前的慢慢补。 理论基础 动态规划的解题步骤 1.确定dp数组及对应下标的含义 2.确定dp的状态转移方程(递推公式) 3.确定dp数组如何初始化 4.确定dp遍历顺序 5.距离推导dp数组验证 509. 斐波那契数 题目链接:http ......
楼梯 随想录 随想 Leetcode 代码

Python MatplotlibDeprecationWarning Matplotlib 3.6 and will be removed two minor releases later

在Pycharm中使用Matplotlib中的pyplot时,运行代码报错: MatplotlibDeprecationWarning: Support for FigureCanvases without a required_interactive_framework attribute was ......

Redis - string类型

Redis的key是String类型的,如果Value如果也是String类型,相当于把两个字符串映射起来,即key-value。这里字符串不仅仅是传统意义上的字符串,例如“hello world”,也可以是JSON、HTML等。 1、string 字符串 //string key := "go2k ......
类型 string Redis

MissingServletRequestParameterException: Required request parameter 'xxx' for method parameter type String is not present异常处理

关于简单参数传递的一个异常 先前情提要一下,在练习一个带分页的员工查询请求功能,接口文档描述如下 其中页码跟记录数是必须参数,然后有个按姓名模糊查询,这个参数是可有可无的 然后我最初写的代码长这样 用@RequestParam注解来获取这个url中携带的简单参数 然后测试页面的时候数据出不来,ide ......