作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 循环 日期 题目地址:https://leetcode.com/problems/check-if-word-is-valid-after-substitutions/ 题目描述 We are given that the string "abc" is valid. From any valid string V, we may spli…
题目如下: We are given that the string "abc" is valid. From any valid string V, we may split V into two pieces X and Y such that X + Y (X concatenated with Y) is equal to V.  (X or Y may be empty.)  Then, X + "abc" + Y is also valid. If fo…
We are given that the string "abc" is valid. From any valid string V, we may split V into two pieces X and Y such that X + Y (X concatenated with Y) is equal to V.  (Xor Y may be empty.)  Then, X + "abc" + Y is also valid. If for examp…
网址:https://leetcode.com/problems/check-if-word-is-valid-after-substitutions/ 参考:https://leetcode.com/problems/check-if-word-is-valid-after-substitutions/discuss/247626/JavaPythonC%2B%2B-Stack-Solution-O(N 方法1:使用c++自带的find函数和erase函数 class Solution { p…
We are given that the string "abc" is valid. From any valid string V, we may split V into two pieces X and Y such that X + Y (X concatenated with Y) is equal to V.  (X or Y may be empty.)  Then, X + "abc" + Y is also valid. If for exam…
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 方法一:DFS 方法二:迭代 日期 [LeetCode] 题目地址:https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ Total Accepted: 55876 Total Submissions: 177210 Difficulty: Easy 题目描述 Given…
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 单调递减栈 日期 题目地址:https://leetcode.com/problems/next-greater-node-in-linked-list/ 题目描述 We are given a linked list with head as the first node. Let's number the nodes in the list: no…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/description/ 题目描述 Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers…
[LeetCode]678. Valid Parenthesis String 解题报告(Python) 标签(空格分隔): LeetCode 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.me/ 题目地址:https://leetcode.com/problems/valid-parenthesis-string/description/ 题目描述: Given a string containing only three types…
[LeetCode]Longest Word in Dictionary through Deleting 解题报告 标签(空格分隔): LeetCode 题目地址:https://leetcode.com/problems/longest-word-in-dictionary-through-deleting/#/description 题目描述: Given a string and a string dictionary, find the longest string in the di…