mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-30 13:43:59 +08:00
Restructure preparation section
This commit is contained in:
@ -24,15 +24,12 @@ String
|
||||
- Given a string, find the longest substring without repeating characters. For example, for string `'abccdefgh'`, the longest substring is `'cdefgh'`.
|
||||
- [Source](http://blog.gainlo.co/index.php/2016/10/07/facebook-interview-longest-substring-without-repeating-characters/)
|
||||
- Given a string, return the string with duplicate characters removed.
|
||||
- How many string representations are there for an integer where `a->1, b->2, ... z->26`.
|
||||
- E.g. `126` can be `'az'` or `'abf'`.
|
||||
- Write a function that receives a regular expression (allowed chars = from `'a'` to `'z'`, `'*'`, `'.'`) and a string containing lower case english alphabet characters and return `true` or `false` whether the string matches the regex.
|
||||
- E.g. `'ab*a'`, `'abbbbba'` => `true`.
|
||||
- E.g. `'ab*b.'`, `'aba'` => `true`.
|
||||
- E.g. `'abc*'`, `'acccc'` => `false`.
|
||||
- Given a rectangular grid with letters, search if some word is in the grid.
|
||||
- Given two strings representing integer numbers (`'123'` , `'30'`) return a string representing the sum of the two numbers: `'153'`.
|
||||
- Given a really big file with a lots of Facebook posts, find the ten most-used words.
|
||||
- A professor wants to see if two students have cheated when writing a paper. Design a function `hasCheated(String s1, String s2, int N)` that evaluates to `true` if two strings have a common substring of length `N`.
|
||||
- Follow up: Assume you don't have the possibility of using `String.contains()` and `String.substring()`. How would you implement this?
|
||||
- Print all permutations of a given string.
|
||||
|
Reference in New Issue
Block a user