码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 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

  • 相关阅读:
    合肥对新通过(CMMI)五级、四级、三级认证的软件企业,对新通过信息技术服务标准(ITSS)认证的软件企业,给予最高50万奖励
    urdf标签理解
    【Vue+ElementUI】Table表格实现自定义表头展示+表头拖拽排序(附源码)
    如何检验下载的大模型checkpoint文件是否正确的解决方案
    [计算机提升] Windows文件系统类型介绍
    docker自动构建jar镜像,自动发布最新镜像的简单shell脚本
    Kafka
    基于SSM的新闻管理系统
    三款Zookeeper可视化工具、ZooInspector、prettyZoo、ZooKeeperAssistant
    【Java】集合 之 Java集合简介
  • 原文地址:https://blog.csdn.net/qq_15711195/article/details/126114392
  • 最新文章
  • 沪漂五周年了:我越来越迷茫了
    Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文
    MySQL-Seconds_behind_master的精度误差
    [MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间
    AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊
    Agent OS :五种驯服不确定性的范式
    PortSwigger SQL注入LAB11
    数据库即时编译JIT
    [Begin]AI Learn Data Day 0
    深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号