GoZSY/Add-palindrome-string
Record text
对于一个字符串,我们想通过添加字符的方式使得新的字符串整体变成回文串,但是只能在原串的结尾添加字符,请返回在结尾添加的最短字符串。 给定原字符串A及它的长度n,请返回添加的字符串。保证原串不是回文串。 测试样例: "ab",2 返回:"a"
对于一个字符串,我们想通过添加字符的方式使得新的字符串整体变成回文串,但是只能在原串的结尾添加字符,请返回在结尾添加的最短字符串。 给定原字符串A及它的长度n,请返回添加的字符串。保证原串不是回文串。 测试样例: "ab",2 返回:"a"
Cite this record
MLA
"GoZSY/Add-palindrome-string." Software Heritage origin index (GitHub origins), n.d., https://git.go-v.org/record/GoZSY%2FAdd-palindrome-string.
Chicago
"GoZSY/Add-palindrome-string." Software Heritage origin index (GitHub origins). n.d.. https://git.go-v.org/record/GoZSY%2FAdd-palindrome-string.
APA
Software Heritage origin index (GitHub origins). (n.d.). GoZSY/Add-palindrome-string. https://git.go-v.org/record/GoZSY%2FAdd-palindrome-string
Share card · JSON record · Cite this record (BibTeX) · Embed