k*********n 发帖数: 6 | 1 1. ArrayList
2. encode/decode string
As an example, for the input string "bJbb++b":
/* 1. 'b' occurs 4 times.
* '+' occurs 2 times.
* 'J' occurs 1 times.
* 2. Thus, the following encodings are assigned:
* 'b' -> "1"
* '+' -> "01"
* 'J' -> "001"
* 3. By concatenating the encodings together, we get:
* "10011101011".
*/
附上一些他人的Snapchat面經
1. word ladder
2. soduku solver
3. soduku valid
4. AB index from string
5. diff
6. word splitter
7. 2 sum, 3 sum
8. Tree related
9. LRU cache
10. Bytes Prefix
Good luck. |
f*******t 发帖数: 7549 | 2 貌似是标准huffman encoding,应该秒杀了 |
d*******t 发帖数: 8 | 3 第二题应该是一个Quit了斯坦福的白人小哥出的吧...他的编码规则比哈夫曼简单不少,
就是往前面加0... |
r****7 发帖数: 2282 | 4 压缩率没有哈弗曼编码大啊
少,
【在 d*******t 的大作中提到】 : 第二题应该是一个Quit了斯坦福的白人小哥出的吧...他的编码规则比哈夫曼简单不少, : 就是往前面加0...
|
B*******1 发帖数: 2454 | 5 哈弗慢没有 boolean coder压缩大吧?
★ 发自iPhone App: ChineseWeb 1.0.1
【在 r****7 的大作中提到】 : 压缩率没有哈弗曼编码大啊 : : 少,
|
B*******1 发帖数: 2454 | 6 http://www.binaryessence.com/dct/en000134.htm
★ 发自iPhone App: ChineseWeb 1.0.1
【在 B*******1 的大作中提到】 : 哈弗慢没有 boolean coder压缩大吧? : : ★ 发自iPhone App: ChineseWeb 1.0.1
|
b**********5 发帖数: 7881 | 7 这个encode/decode, 如果出现3次, 用什么来encode?
【在 k*********n 的大作中提到】 : 1. ArrayList : 2. encode/decode string : As an example, for the input string "bJbb++b": : /* 1. 'b' occurs 4 times. : * '+' occurs 2 times. : * 'J' occurs 1 times. : * 2. Thus, the following encodings are assigned: : * 'b' -> "1" : * '+' -> "01" : * 'J' -> "001"
|
b**********5 发帖数: 7881 | 8 AB index from string
5. diff
byte prefix
这些都是什么题啊。。 太general了 |
u*****l 发帖数: 444 | 9 如果两个字符出现的频率相同,那怎么编码?
【在 k*********n 的大作中提到】 : 1. ArrayList : 2. encode/decode string : As an example, for the input string "bJbb++b": : /* 1. 'b' occurs 4 times. : * '+' occurs 2 times. : * 'J' occurs 1 times. : * 2. Thus, the following encodings are assigned: : * 'b' -> "1" : * '+' -> "01" : * 'J' -> "001"
|
k*********n 发帖数: 6 | 10 1. ArrayList
2. encode/decode string
As an example, for the input string "bJbb++b":
/* 1. 'b' occurs 4 times.
* '+' occurs 2 times.
* 'J' occurs 1 times.
* 2. Thus, the following encodings are assigned:
* 'b' -> "1"
* '+' -> "01"
* 'J' -> "001"
* 3. By concatenating the encodings together, we get:
* "10011101011".
*/
附上一些他人的Snapchat面經
1. word ladder
2. soduku solver
3. soduku valid
4. AB index from string
5. diff
6. word splitter
7. 2 sum, 3 sum
8. Tree related
9. LRU cache
10. Bytes Prefix
Good luck. |
|
|
f*******t 发帖数: 7549 | 11 貌似是标准huffman encoding,应该秒杀了 |
d*******t 发帖数: 8 | 12 第二题应该是一个Quit了斯坦福的白人小哥出的吧...他的编码规则比哈夫曼简单不少,
就是往前面加0... |
r****7 发帖数: 2282 | 13 压缩率没有哈弗曼编码大啊
少,
【在 d*******t 的大作中提到】 : 第二题应该是一个Quit了斯坦福的白人小哥出的吧...他的编码规则比哈夫曼简单不少, : 就是往前面加0...
|
B*******1 发帖数: 2454 | 14 哈弗慢没有 boolean coder压缩大吧?
★ 发自iPhone App: ChineseWeb 1.0.1
【在 r****7 的大作中提到】 : 压缩率没有哈弗曼编码大啊 : : 少,
|
B*******1 发帖数: 2454 | 15 http://www.binaryessence.com/dct/en000134.htm
★ 发自iPhone App: ChineseWeb 1.0.1
【在 B*******1 的大作中提到】 : 哈弗慢没有 boolean coder压缩大吧? : : ★ 发自iPhone App: ChineseWeb 1.0.1
|
b**********5 发帖数: 7881 | 16 这个encode/decode, 如果出现3次, 用什么来encode?
【在 k*********n 的大作中提到】 : 1. ArrayList : 2. encode/decode string : As an example, for the input string "bJbb++b": : /* 1. 'b' occurs 4 times. : * '+' occurs 2 times. : * 'J' occurs 1 times. : * 2. Thus, the following encodings are assigned: : * 'b' -> "1" : * '+' -> "01" : * 'J' -> "001"
|
b**********5 发帖数: 7881 | 17 AB index from string
5. diff
byte prefix
这些都是什么题啊。。 太general了 |
u*****l 发帖数: 444 | 18 如果两个字符出现的频率相同,那怎么编码?
【在 k*********n 的大作中提到】 : 1. ArrayList : 2. encode/decode string : As an example, for the input string "bJbb++b": : /* 1. 'b' occurs 4 times. : * '+' occurs 2 times. : * 'J' occurs 1 times. : * 2. Thus, the following encodings are assigned: : * 'b' -> "1" : * '+' -> "01" : * 'J' -> "001"
|
j****1 发帖数: 99 | 19 +1
could your PLS share it?
【在 b**********5 的大作中提到】 : AB index from string : 5. diff : byte prefix : 这些都是什么题啊。。 太general了
|
y*****e 发帖数: 712 | |