LeetCode常见题型——字符串

1. 算法思想

字符串可以看成是字符组成的数组。由于字符串是程序里经常需要处理的数据类型,因此有
很多针对字符串处理的题目,以下是一些常见的类型。

  • 字符串比较
  • 字符串匹配
  • 字符串解析
  • .....

2. 常见题型

LeetCode-242. Valid Anagram [C++][Java]_贫道绝缘子的博客-CSDN博客Given two stringssandt, returntrueiftis an anagram ofs, andfalseotherwise. AnAnagramis a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.https://blog.csdn.net/qq_15711195/article/details/124608687LeetCode-205. Isomorphic Strings [C++][Java]_贫道绝缘子的博客-CSDN博客Given two stringssandt,determine if they are isomorphic. Two stringssandtare isomorphic if the characters inscan be replaced to gett.https://blog.csdn.net/qq_15711195/article/details/124609001LeetCode-647. Palindromic Substrings [C++][Java]_贫道绝缘子的博客-CSDN博客Given a strings, returnthe number ofpalindromic substringsin it. A string is apalindromewhen it reads the same backward as forward. Asubstringis a contiguous sequence of characters within the string.https://blog.csdn.net/qq_15711195/article/details/124609381LeetCode-696. Count Binary Substrings [C++][Java]_贫道绝缘子的博客-CSDN博客Give a binary strings, return the number of non-empty substrings that have the same number of0's and1's, and all the0's and all the1's in these substrings are grouped consecutively. Substrings that occur multiple times are counted the number of times.https://blog.csdn.net/qq_15711195/article/details/124609810LeetCode-224. Basic Calculator [C++][Java]_贫道绝缘子的博客-CSDN博客Given a stringsrepresenting a valid expression, implement a basic calculator to evaluate it, and returnthe result of the evaluation.https://blog.csdn.net/qq_15711195/article/details/124611448LeetCode-227. Basic Calculator II [C++][Java]_贫道绝缘子的博客-CSDN博客Given a stringswhich represents an expression,evaluate this expression and return its value. The integer division should truncate toward zero.https://blog.csdn.net/qq_15711195/article/details/124610231LeetCode-772. Basic Calculator III_贫道绝缘子的博客-CSDN博客Implement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers and empty spaces .https://blog.csdn.net/qq_15711195/article/details/126114213?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22126114213%22%2C%22source%22%3A%22qq_15711195%22%7D&ctrtid=Oalt2LeetCode-28. Implement strStr() [C++][Java]_贫道绝缘子的博客-CSDN博客For the purpose of this problem, we will return 0 whenneedleis an empty string. This is consistent to C'sstrstr()and Java'sindexOf().https://blog.csdn.net/qq_15711195/article/details/124613909LeetCode-409. Longest Palindrome [C++][Java]_贫道绝缘子的博客-CSDN博客Given a stringswhich consists of lowercase or uppercase letters, returnthe length of thelongest palindromethat can be built with those letters. Letters arecase sensitive, for example,"Aa"is not considered a palindrome here.https://blog.csdn.net/qq_15711195/article/details/126114104LeetCode-5. Longest Palindromic Substring [C++][Java]_贫道绝缘子的博客-CSDN博客Given a strings, returnthe longest palindromic substringins.https://blog.csdn.net/qq_15711195/article/details/122833115LeetCode-3. Longest Substring Without Repeating Characters [C++][Java]_贫道绝缘子的博客-CSDN博客Given a strings, find the length of thelongest substringwithout repeating characters.https://blog.csdn.net/qq_15711195/article/details/122817429

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

贫道绝缘子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值