LetLeet Blog
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于

1417.重新格式化字符串

【LetMeFly】1417.重新格式化字符串力扣题目链接:https://leetcode.cn/problems/reformat-the-string/ 给你一个混合了数字和字母的字符串 s,其中的字母均为小写英文字母。 请你将该字符串重新格式化,使得任意两个相邻字符的类型都不同。也就是说,字母后面应该跟着数字,而数字后面应该跟着字母。 请你返回 重新格式化后 的字符串;如果无法按要求重
2022-08-11
题解 > LeetCode
#LeetCode #字符串 #构造 #简单 #题解

640.求解方程

【LetMeFly】640.求解方程:过几天就看不懂了的迷惑性代码,但是是详解力扣题目链接:https://leetcode.cn/problems/solve-the-equation/ 求解一个给定的方程,将x以字符串 "x=#value" 的形式返回。该方程仅包含 '+' , '-' 操作,变量 x 和其对应系数。 如果方程没有解,请返回 "No s
2022-08-10
题解 > LeetCode
#LeetCode #中等 #字符串 #字符串解析 #数学 #模拟 #题解

1413.逐步求和得到正数的最小值

【LetMeFly】1413.逐步求和得到正数的最小值力扣题目链接:https://leetcode.cn/problems/minimum-value-to-get-positive-step-by-step-sum/ 给你一个整数数组 nums 。你可以选定任意的 正数 startValue 作为初始值。 你需要从左到右遍历 nums 数组,并将 startVa
2022-08-09
题解 > LeetCode
#LeetCode #前缀和 #数组 #模拟 #简单 #题解

179.最大数

【LetMeFly】179.最大数力扣题目链接:https://leetcode.cn/problems/largest-number/ 给定一组非负整数 nums,重新排列每个数的顺序(每个数不可拆分)使之组成一个最大的整数。 注意:输出结果可能非常大,所以你需要返回一个字符串而不是整数。   示例 1: 输入:nums = [10,2] 输出:"210" 示例 
2022-08-08
题解 > LeetCode
#cmp #LeetCode #中等 #字符串 #排序 #贪心 #题解

174.地下城游戏

【LetMeFly】174.地下城游戏:原数组上修改力扣题目链接:https://leetcode.cn/problems/dungeon-game/ table.dungeon, .dungeon th, .dungeon td { border:3px solid black; } .dungeon th, .dungeon td { text-align: ce
2022-08-06
题解 > LeetCode
#DP #LeetCode #动态规划 #困难 #数组 #矩阵 #题解

1408.数组中的字符串匹配

【LetMeFly】1408.数组中的字符串匹配力扣题目链接:https://leetcode.cn/problems/string-matching-in-an-array/ 给你一个字符串数组 words ,数组中的每个字符串都可以看作是一个单词。请你按 任意 顺序返回 words 中是其他单词的子字符串的所有单词。 如果你可以删除 words[j] 最左侧和/或最右侧的若干字符得
2022-08-06
题解 > LeetCode
#find #LeetCode #字符串 #字符串匹配 #暴力 #简单 #题解

173.二叉搜索树迭代器

【LetMeFly】173.二叉搜索树迭代器:中序遍历的非递归实现力扣题目链接:https://leetcode.cn/problems/binary-search-tree-iterator/ 实现一个二叉搜索树迭代器类BSTIterator ,表示一个按中序遍历二叉搜索树(BST)的迭代器: BSTIterator(TreeNode root) 初始化 BSTIterator 类的一个
2022-08-05
题解 > LeetCode
#LeetCode #中序遍历 #中序遍历的非递归实现 #中等 #二叉搜索树 #二叉树 #栈 #树 #设计 #迭代器 #题解

623.在二叉树中增加一行

【LetMeFly】623.在二叉树中增加一行:DFS / BFS力扣题目链接:https://leetcode.cn/problems/add-one-row-to-tree/ 给定一个二叉树的根 root 和两个整数 val 和 depth ,在给定的深度 depth 处添加一个值为 val 的节点行。 注意,根节点&nb
2022-08-05
题解 > LeetCode
#BFS #DFS #LeetCode #中等 #二叉树 #层次遍历 #广度优先搜索 #树 #深度优先搜索 #题解

168.Excel表列名称

【LetMeFly】168.Excel表列名称力扣题目链接:https://leetcode.cn/problems/excel-sheet-column-title/ 给你一个整数 columnNumber ,返回它在 Excel 表中相对应的列名称。 例如: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ...   示例 1
2022-08-04
题解 > LeetCode
#LeetCode #字符串 #数学 #模拟 #简单 #进制 #题解

167.两数之和 II - 输入有序数组

【LetMeFly】167.两数之和 II - 输入有序数组力扣题目链接:https://leetcode.cn/problems/two-sum-ii-input-array-is-sorted/ 给你一个下标从 1 开始的整数数组 numbers ,该数组已按 非递减顺序排列  ,请你从数组中找出满足相加之和等于目标数 target 的两个数。如果设这两个数分别是
2022-08-04
题解 > LeetCode
#LeetCode #中等 #二分 #双指针 #哈希 #数组 #题解
1…99100101102103…111

搜索

Hexo's Fluid ALL atricles by LetMeFly