当前位置:网站首页>Leetcode 1328. 破坏回文串(可以,已解决)
Leetcode 1328. 破坏回文串(可以,已解决)
2022-07-17 14:27:00 【我不是萧海哇~~~~】

给你一个由小写英文字母组成的回文字符串 palindrome ,请你将其中 一个 字符用任意小写英文字母替换,使得结果字符串的 字典序最小 ,且 不是 回文串。
请你返回结果字符串。如果无法做到,则返回一个 空串 。
如果两个字符串长度相同,那么字符串 a 字典序比字符串 b 小可以这样定义:在 a 和 b 出现不同的第一个位置上,字符串 a 中的字符严格小于 b 中的对应字符。例如,"abcc” 字典序比 “abcd” 小,因为不同的第一个位置是在第四个字符,显然 ‘c’ 比 ‘d’ 小。
示例 1:
输入:palindrome = "abccba"
输出:"aaccba"
解释:存在多种方法可以使 "abccba" 不是回文,例如 "zbccba", "aaccba", 和 "abacba"边栏推荐
- Paper notes: mind the gap an empirical evaluation of impaction ofmissing values techniques in timeseries
- Scala's dosing in idea
- To get to the bottom: Principle Analysis of Objective-C correlation attribute
- Performance optimization @contented to reduce pseudo sharing
- [leetcode weekly replay] 302 weekly 20220717
- LOJ 2324 - "Tsinghua training 2017" small y and binary tree
- Evaluation method of machine learning model
- Environment variable configuration of win10
- LeetCode 745. Prefix and suffix search
- 要想组建敏捷团队,这些方法不可少
猜你喜欢

Daily question brushing record (26)

Ppde Q2 welcome | welcome 22 AI developers to join the propeller developer technical expert program!

Detailed explanation of multiple linear regression

Mpu9250 ky9250 attitude, angle module and mpu9250 MPL DMA comparison

LeetCode 558. Intersection of quadtree

Tencent cloud server uses image to deploy WordPress personal website!

Tire Defect Detection Using Fully Convolutional Network-论文阅读笔记

Unity Dropdown(可编辑,可输入)下拉选择框,带文本联想

leetcode-08

Scala's dosing in idea
随机推荐
UE4 understanding of animation blueprint
6G smart endogenous: technical challenges, architecture and key features
Four methods of traversing key value in map
Introduction to common distributed locks
leetcode-08
synchronized锁升级
How can enterprise telecommuting be more efficient?
Microservice online specification
Cmake common commands (V)
XSS. haozi. Me brush questions
Data Guard Broker的概念和Data Guard Broker的配置过程
Rotation in unity3d
How does unity3d use the asset store to download some useful resource packages
2022/7/14
Mysql优化系列之limit查询
How much money can you make by inventing flash memory? This is a Japanese dog blood story
Unity dropdown (editable, inputable) drop-down selection box with Text Association
8. Fixed income investment
How to change and reset forgotten root password in RHEL 9
zabbix代理服务器配置