字符串操作(C++)

来源:互联网 发布:有网络无法连接服务器 编辑:程序博客网 时间:2024/05/21 22:37

1、从字符串的数组中找出最大的公共前缀


2、最长连续序列-------------leetcode第128题

给定整数未排序的数组,找出最长的连续元素序列的长度,例如:给定[100, 4, 200, 1, 3, 2];最长连续元素序列为[1, 2, 3, 4];返回4


3、最长回文子字符串-------------leetcode第5题


4、没有重复字符的最长子字符串----------leetcode第


5、字符串相乘------leetcode第43题

给定表示为字符串的两个数字,返回作为字符串的数字的乘积


6、最小窗口子字符串----------leetcode第76题

S = "ADOBECODEBANC"
T = "ABC"

Minimum window is "BANC".


7、回文划分--------leetcode第131题

For example, given s = "aab",
Return

[  ["aa","b"],  ["a","a","b"]]

8、回文划分-----------leetcode第132题

For example, given s = "aab",
Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut.


9、String to Integer (atoi)------leetcode第8题


10、Substring with Concatenation of All Words-----leetcode第30题

s"barfoothefoobarman"
words["foo", "bar"]

You should return the indices: [0,9].


11、Reverse Words in a String------leetcode第151题

For example,
Given s = "the sky is blue",
return "blue is sky the".


12、 Isomorphic Strings------------leetcode第205题(是否为同构字符串)

For example,
Given "egg""add", return true.

Given "foo""bar", return false.

Given "paper""title", return true.


13、Reverse Vowels of a String----------leetcode第345题

Example 1:
Given s = "hello", return "holle".

Example 2:
Given s = "leetcode", return "leotcede".


14、Interleaving String----------leetcode第97题

Given:
s1 = "aabcc",
s2 = "dbbca",

When s3 = "aadbbcbcac", return true.
When s3 = "aadbbbaccc", return false.


0 0
原创粉丝点击