中午不知道吃啥的,又可以省了# Joke - 肚皮舞运动
j*2
1 楼
1. 如何设计一个 short link 生成器?
What are the keys and values in the hashtable?
2. Given an input string and an order string, e.g., "house" and "soup",
print out characters in input string according to character order in the
order string. For characters in input string but not in the order string,
output them in the end, their relative order doesn't matter. For example,
for input string "house", "souhe" and "soueh" are valid outputs.
我完全看懵了....... 这题想考什么呀? 因为我有一个很stupid的法子
Associate each char of the order string a count. Go over the input string,
populate the count field. Go over the order string, output the char count
times. Also while we go over the input string, mark a char[256] table. Then
output those that are not in the order string.
可是这出题的本意是什么呀?
What are the keys and values in the hashtable?
2. Given an input string and an order string, e.g., "house" and "soup",
print out characters in input string according to character order in the
order string. For characters in input string but not in the order string,
output them in the end, their relative order doesn't matter. For example,
for input string "house", "souhe" and "soueh" are valid outputs.
我完全看懵了....... 这题想考什么呀? 因为我有一个很stupid的法子
Associate each char of the order string a count. Go over the input string,
populate the count field. Go over the order string, output the char count
times. Also while we go over the input string, mark a char[256] table. Then
output those that are not in the order string.
可是这出题的本意是什么呀?