Skip to content

Commit c08de1a

Browse files
StoneLyuazl397985856
authored andcommitted
Translation for String Problems (azl397985856#40)
* correct typos * Add translations * 新增HTTP/1.0, HTTP/1.1, HTTP/2的对比 * 增加HTTP/1.1和HTTP/2的性能对比的Demo * 翻译大部分基础数据结构,但是REACT部分没有翻译 * update description of `HTTP/1.0` * add WIP tag, update some translation details * change 'fundamental' to 'basic' * remove some trivial details about HTTP/1.0 * error correction * translation for DP * translation for string problems
1 parent 8beaefb commit c08de1a

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

thinkings/string-problems-en.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Problems about String
2+
3+
There are many problems about string, including `substr` implementation, validating palindrome and common substring and so on. Essentially, a string is also an array of characters. So, many ideas of array can be used to solve the problems of string.
4+
5+
There are many algorithms which specifically used for handle strings. Such as `trie`, `huffman tree`, `Manacher` and so on.
6+
7+
## Problems about Implementing Build-in Functions of String
8+
9+
This kind of questions are the most direct ones with less ambiguous meanings and less challenging. So, it is always be used in the phone interviews.
10+
11+
- [28.implement-str-str](https://leetcode.com/problems/implement-strstr/)
12+
- [344.reverse-string](../backlog/344.reverse-string.js)
13+
14+
## Palindrome
15+
16+
A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward. Like "level" and "noon".
17+
18+
There is universal method to check whether a string is palindrome or not which uses two pointers, one at the begining and the other at the end, to move to the middle together step by step. You can check the following question `125`for more detials.
19+
For finding the longest palindrome, it is possible to reduce many meaningless algorithms if we take full advantage of the feature of palindrome. Manacher's algorithm is a typical example.
20+
21+
### Related Questions
22+
23+
- [5.longest-palindromic-substring](../problems/5.longest-palindromic-substring.md)
24+
25+
- [125.valid-palindrome](../problems/125.valid-palindrome.md)
26+
27+
- [131.palindrome-partitioning](../problems/131.palindrome-partitioning.md)
28+
29+
- [shortest-palindrome](https://leetcode.com/problems/shortest-palindrome/)
30+
31+
- [516.longest-palindromic-subsequence](../problems/516.longest-palindromic-subsequence.md)
32+
33+
## Prefix Questions
34+
35+
It is intuitive to use prefix tree to handle this kind of questions. But it also has some disadvantages. For example, if there are less common prefix, using prefix tree may cost more RAMs.
36+
37+
### Related Questions
38+
39+
-[14.longest-common-prefix](../14.longest-common-prefix.js)
40+
-[208.implement-trie-prefix-tree](../problems/208.implement-trie-prefix-tree.md)
41+
42+
## Other Questions
43+
44+
- [139.word-break](../problems/139.word-break.md)

0 commit comments

Comments
 (0)