From 6a354fcb57148f3668c350981697ed09f07e544f Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Wed, 28 Oct 2026 22:51:11 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Leetcode=20=E9=A2=98=E8=A7=A3=20-=20?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码经力扣判题验证;示例代码块的语言标注改为 text。 --- notes/Leetcode 题解 - 字符串.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/notes/Leetcode 题解 - 字符串.md b/notes/Leetcode 题解 - 字符串.md index fe94503e..8e3aef8f 100644 --- a/notes/Leetcode 题解 - 字符串.md +++ b/notes/Leetcode 题解 - 字符串.md @@ -20,7 +20,7 @@ 编程之美 3.1 -```html +```text s1 = AABCD, s2 = CDAA Return : true ``` @@ -33,7 +33,7 @@ s1 进行循环移位的结果是 s1s1 的子字符串,因此只要判断 s2 编程之美 2.17 -```html +```text s = "abcd123" k = 3 Return "123abcd" ``` @@ -46,7 +46,7 @@ Return "123abcd" 程序员代码面试指南 -```html +```text s = "I am a student" Return "student a am I" ``` @@ -59,7 +59,7 @@ Return "student a am I" [Leetcode](https://leetcode.com/problems/valid-anagram/description/) / [力扣](https://leetcode-cn.com/problems/valid-anagram/description/) -```html +```text s = "anagram", t = "nagaram", return true. s = "rat", t = "car", return false. ``` @@ -92,7 +92,7 @@ public boolean isAnagram(String s, String t) { [Leetcode](https://leetcode.com/problems/longest-palindrome/description/) / [力扣](https://leetcode-cn.com/problems/longest-palindrome/description/) -```html +```text Input : "abccccdd" Output : 7 Explanation : One longest palindrome that can be built is "dccaccd", whose length is 7. @@ -125,7 +125,7 @@ public int longestPalindrome(String s) { [Leetcode](https://leetcode.com/problems/isomorphic-strings/description/) / [力扣](https://leetcode-cn.com/problems/isomorphic-strings/description/) -```html +```text Given "egg", "add", return true. Given "foo", "bar", return false. Given "paper", "title", return true. @@ -155,7 +155,7 @@ public boolean isIsomorphic(String s, String t) { [Leetcode](https://leetcode.com/problems/palindromic-substrings/description/) / [力扣](https://leetcode-cn.com/problems/palindromic-substrings/description/) -```html +```text Input: "aaa" Output: 6 Explanation: Six palindromic strings: "a", "a", "a", "aa", "aa", "aaa". @@ -216,7 +216,7 @@ public boolean isPalindrome(int x) { [Leetcode](https://leetcode.com/problems/count-binary-substrings/description/) / [力扣](https://leetcode-cn.com/problems/count-binary-substrings/description/) -```html +```text Input: "00110011" Output: 6 Explanation: There are 6 substrings that have equal number of consecutive 1's and 0's: "0011", "01", "1100", "10", "0011", and "01".