首页
AI Coding
NEW
沸点
课程
直播
活动
AI刷题
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
Leetcode
AQin
创建于2022-07-06
订阅专栏
一起来科学刷题٩(˃̶͈̀௰˂̶͈́)و
等 15 人订阅
共62篇文章
创建于2022-07-06
订阅专栏
默认顺序
默认顺序
最早发布
最新发布
【陪伴式刷题】Day 41|动态规划|139.单词拆分(Word Break)
刷题顺序按照代码随想录建议 题目描述 英文版描述 Given a string s and a dictionary of strings wordDict, return true if s can
【保姆级】手把手详解动态规划二维动态数组推导及优化过程
我们已经进入动态规划有一段时间了,相信有很多小伙伴像我一样,对动态规划的dp数组是如何从二维优化成一维的产生过很大的疑惑,本篇文章我们通过Leetcode的322.零钱兑换(Coin Change)这
【陪伴式刷题】Day 39|动态规划|518. 零钱兑换 II(Coin Change II)
刷题顺序按照代码随想录建议 题目描述 英文版描述 You are given an integer array coins representing coins of different denomi
【陪伴式刷题】Day 38|动态规划|1049. 最后一块石头的重量 II(Last Stone Weight II)
刷题顺序按照代码随想录建议 题目描述 英文版描述 You are given an array of integers stones where stones[i] is the weight of
【陪伴式刷题】Day 37|动态规划|416.整数拆分(Integer Break)
刷题顺序按照代码随想录建议 题目描述 英文版描述 Given an integer n, break it into the sum of k positive integers, where k >
【陪伴式刷题】Day 36|动态规划|343.整数拆分(Integer Break)
这是第一反应写出的结果,看了题解貌似算是贪心的解法,其实就是根据推理找出规律,大家从1开始推到6、7左右一半就能看出规律了,因为超过4以后,继续分解之后的乘积就会大于原先的
【陪伴式刷题】Day 35|动态规划|62.不同路径(Unique Paths)
刷题顺序按照代码随想录建议 做完这道题,我的感觉就是卡哥的动规5步曲真的绝绝子!!!!!!!!!!
【陪伴式刷题】Day 34|动态规划|509.斐波那契数列(Fibnacci Number)和70.爬楼梯(Climbing Stairs)
三种方法实现经典的斐波那契数列,脱掉场景的外套,70题的本质也是一个斐波那契数列,这两道题非常的像,所以放在一起
【陪伴式刷题】Day 33|贪心算法|738.调递增的数字(Monotone Increasing Digits)
可以看到优化效果很明显,这个其实跟我的第一版思路和方式都一样,不过相比我的那版对于1位和2位的整数做单独处理,这个代码兼容了各个位数的整数,此外有几点很实用的操作
【陪伴式刷题】Day 32|贪心算法|763.划分字母区间(Partition Labels)
两种方法逻辑基本一致,主要是官方将Map优化为了数组,效果果然好了很多(不过基于之前有篇文章作了深入的分析与测试,Leetcode官方的这个时间复杂度和空间复杂度大家就姑且看看,图一乐,别太当真)
【陪伴式刷题】Day 31|贪心算法|452.用最少数量的箭引爆气球🎈(Minimum Number of Arrows to Burst Balloons)
放在最前面的!!!当看到注意事项📋里有 -2^31<= x(start)< x(end)<= 2^31- 1 的时候,使用int类型的参数就要注意是否会越界叻!!!
【陪伴式刷题】Day 30|贪心算法|134.加油站(Gas Station)
难点说明:这种解法比较难懂的就是for循环中if判断的部分,curSum<0 说明了从前面的任意加油站无法到达当前加油站,所以我们只能从当前的下一个继续判断,于是将起始坐标重置为下一加油站的序号,并重
【陪伴式刷题】Day 29|贪心算法|1005.K 次取反后最大化的数组和(Maximize Sum of Array after K Negations)
2023.11.13 将数组按照绝对值大小从大到小排序,注意要按照绝对值的大小,从前向后遍历,遇到负数将其变为正数,同时K--
【陪伴式刷题】Day 28|贪心算法|122.买卖股票的最佳时机 II(Best Time to Buy and Sell Stock II)
刷题顺序按照代码随想录建议 题目描述 英文版描述 You are given an integer array prices where prices[i] is the price of a giv
【陪伴式刷题】Day 27|贪心算法|455.分发饼干(Assign Cookies)
时间复杂度:O(n^2),n为数组g和s长度的较大的值,后半部分嵌套了两次for循环,虽然实际不会每次都遍历全部的元素,因为gLength的长度一直在缩小,但理论上的时间复杂度应该还是O(n^2)
【陪伴式刷题】Day 26|回溯|332.重新安排行程(Reconstruct Itinerary)
刷题顺序按照代码随想录建议 题目描述 英文版描述 You are given a list of airline tickets where tickets[i] = [from(i), to(i)]
【陪伴式刷题】Day 25|回溯|46.全排列(Permutations )
刷题顺序按照代码随想录建议 题目描述 英文版描述 Given an array nums of distinct integers, return all the possible permutati
【陪伴式刷题】Day 24|回溯|78.子集(Subsets)
刷题顺序按照代码随想录建议 题目描述 英文版描述 Given an integer array nums of unique elements, return all possible subsets
【陪伴式刷题】Day 23|回溯|39.组合总和(Combination Sum)
刷题顺序按照代码随想录建议 题目描述 英文版描述 Given an array of distinct integers candidates and a target integer target,
【陪伴式刷题】Day 22|回溯|17.电话号码的字母组合(Letter Combinations of a Phone Number)
刷题顺序按照代码随想录建议 题目描述 英文版描述 Given a string containing digits from 2-9 inclusive, return all possible le
下一页