摘要:
来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/decode-string 给定一个经过编码的字符串,返回它解码后的字符串。 编码规则为: k[encoded_string],表示其中方括号内部的 encoded_string 正好重复 k 次。注意 阅读全文
posted @ 2022-07-21 20:36
xy7112
阅读(159)
评论(0)
推荐(0)
摘要:
来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/backspace-string-compare 给定 s 和 t 两个字符串,当它们分别被输入到空白的文本编辑器后,如果两者相等,返回 true 。# 代表退格字符。 注意:如果对空文本输入退格字符,文 阅读全文
posted @ 2022-07-21 20:33
xy7112
阅读(64)
评论(0)
推荐(0)
摘要:
来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/bulls-and-cows 你在和朋友一起玩 猜数字(Bulls and Cows)游戏,该游戏规则如下: 写出一个秘密数字,并请朋友猜这个数字是多少。朋友每猜测一次,你就会给他一个包含下述信息的提示: 阅读全文
posted @ 2022-07-21 18:03
xy7112
阅读(795)
评论(0)
推荐(0)
摘要:
来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/two-sum 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是 阅读全文
posted @ 2022-07-21 17:18
xy7112
阅读(20)
评论(0)
推荐(0)
摘要:
来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/longest-repeating-character-replacement 给你一个字符串 s 和一个整数 k 。你可以选择字符串中的任一字符,并将其更改为任何其他大写英文字符。该操作最多可执行 k 阅读全文
posted @ 2022-07-21 15:06
xy7112
阅读(69)
评论(0)
推荐(0)
摘要:
来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/find-all-anagrams-in-a-string 给定两个字符串 s 和 p,找到 s 中所有 p 的 异位词 的子串,返回这些子串的起始索引。不考虑答案输出的顺序。 异位词 指由相同字母重排列 阅读全文
posted @ 2022-07-21 13:57
xy7112
阅读(56)
评论(0)
推荐(0)

浙公网安备 33010602011771号