由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - Google第二轮电面
相关主题
Google Intern面经顺求bless~A家电面题
Google实习第一轮电话面试总结G家电面被拒,请帮助分析原因
贡献两道的面试题Minimum Window Substring
amazon 第一轮电话面试一道linkedin的题。
请问下那个查找包含给定字符的最短子串咋做?[合集] ASCII字符发音总结
Find first non-repeating char怎么做?弱问一个关于字符类型转换的一个问题
Google的面经热腾腾的hulu面经
顶风上来问道题:一个很大char[], 如何in-place 删除重复元素find first nonduplicate unicode questions
相关话题的讨论汇总
话题: unicode话题: 12623话题: str话题: utf8话题: know
进入JobHunting版参与讨论
1 (共1页)
s********u
发帖数: 1109
1
各种不顺,早上apple来了拒信,下午google面的也不好,阿森纳还输球。。
可能还是沟通能力太差了,应该是很简单的题目,就是不知道他想说什么。
我发觉面试相比leetcode一大难度就是有时候面试官会说的比较vague,要靠自己问。
。要是他每次都直接把题目书写出来,倒是方便多了。。
就是实现一个strchr,只不过第二个参数不是字符,而是字符串,返回第一次出现的指
针。
/*
Find the first occurrence in str of _any_ character in set. Both are NULL
terminated ASCII C-strings. This is like strchr, except that the second
parameter functions as a set, rather than a single character.
str set returns
qxcdef csz str + 2 == &str[2]
axcdef wya str + 0 == &str[0]
axcdef cxa str + 0 == &str[0]
abc efg NULL
*/
这个就用一个hashtable做就可以了。结果麻烦开始了,他说用unicode怎么样,结果我
对unicode完全不了解,他就开始解释,就说unicode一个字符可能用1-5个char来表示
?那我就说假设有一个table帮你判定是不是unicode,那么就像wordbreak那个题一样
,往前走 碰到完整的unicode就记下来。
结果他说
ㅈㅏㅇㅏ != 장ㅏ
那我说怎么确定这个字符串的分割方式啊。。弄了半天。。然后他又说用_分割,因为
时间很紧张了,我就照这个意思简单地写了下code。应该让他举一个完整的例子的。写
完了他有点不置可否。
可能是因为时间不够,就用了10多分钟问了些简历,回答的也不算很好,就结束了。
有人能讲讲unicode用c字符串来表示是怎么个情况么。。
结果的话,估计是攒rp了。
c*******i
发帖数: 160
2
unicode不能直接brute force 扫吗?

【在 s********u 的大作中提到】
: 各种不顺,早上apple来了拒信,下午google面的也不好,阿森纳还输球。。
: 可能还是沟通能力太差了,应该是很简单的题目,就是不知道他想说什么。
: 我发觉面试相比leetcode一大难度就是有时候面试官会说的比较vague,要靠自己问。
: 。要是他每次都直接把题目书写出来,倒是方便多了。。
: 就是实现一个strchr,只不过第二个参数不是字符,而是字符串,返回第一次出现的指
: 针。
: /*
: Find the first occurrence in str of _any_ character in set. Both are NULL
: terminated ASCII C-strings. This is like strchr, except that the second
: parameter functions as a set, rather than a single character.

s********u
发帖数: 1109
3
好像是一个unicode对应多个char。而且比如ab是一个unicode,cd是一个unicode,但
是abcd也可能是一个unicode,所以他一直在跟我解释怎么标记这些。但肯定有办法区
分的,否则就不是唯一了,那还怎么表示字符啊,又不是word break问题。应该多由我
来问
的,这些更清楚些。
最后也不知道是不是到底这意思。

【在 c*******i 的大作中提到】
: unicode不能直接brute force 扫吗?
w*****e
发帖数: 931
4
但是怎么知道一个char是单独的还是一个字符的一部分?java 里倒是现成的。

【在 c*******i 的大作中提到】
: unicode不能直接brute force 扫吗?
s********u
发帖数: 1109
5
是啊,最后我不管了,就当是有个结束符_,但这样好像又太简单了。。但想不出其他
办法,我觉得他可能是想让我稍微设计下的。那就算设计,我也会设计成这样。。

【在 w*****e 的大作中提到】
: 但是怎么知道一个char是单独的还是一个字符的一部分?java 里倒是现成的。
J****3
发帖数: 427
6
ㅈㅏㅇㅏ != 장ㅏ这是啥。。。
x*****s
发帖数: 125
7
题目含糊也是考点之一,dealing with ambiguity是工程师必备的技能啊,如果一切都
清清楚楚,找个机器人来做不就好了
unicode本身只是一个号码,编码才决定了它在内存中的大小,utf-8就是变长的(你的
面试官给的例子),utf-16则是定长的(固定4字节)
d**********x
发帖数: 4083
8
read something about UTF8.
Unicode is a mapping, UTF8, UTF16, ... are encoding/implementation of the
mapping.

【在 s********u 的大作中提到】
: 好像是一个unicode对应多个char。而且比如ab是一个unicode,cd是一个unicode,但
: 是abcd也可能是一个unicode,所以他一直在跟我解释怎么标记这些。但肯定有办法区
: 分的,否则就不是唯一了,那还怎么表示字符啊,又不是word break问题。应该多由我
: 来问
: 的,这些更清楚些。
: 最后也不知道是不是到底这意思。

f******n
发帖数: 208
9
以UTF-8为例,一个字符可以由1~4个char组成,通过查第一个字节可以判断该字符总共
有几个字节(其设计类似哈弗曼编码)。
1)构建哈希表的时候,先确定当前字符是几个字节,比如4个,那就把这4个当成一个
字符串,作为key存入哈希。然后跳过这四个字节,继续往前走。
2)扫描字符串的时候同理。
l*n
发帖数: 529
10
http://zh.wikipedia.org/wiki/UTF-8#UTF-8.E7.9A.84.E7.B7.A8.E7.A
这面试的时候谁能想到啊...

【在 f******n 的大作中提到】
: 以UTF-8为例,一个字符可以由1~4个char组成,通过查第一个字节可以判断该字符总共
: 有几个字节(其设计类似哈弗曼编码)。
: 1)构建哈希表的时候,先确定当前字符是几个字节,比如4个,那就把这4个当成一个
: 字符串,作为key存入哈希。然后跳过这四个字节,继续往前走。
: 2)扫描字符串的时候同理。

相关主题
Find first non-repeating char怎么做?A家电面题
Google的面经G家电面被拒,请帮助分析原因
顶风上来问道题:一个很大char[], 如何in-place 删除重复元素Minimum Window Substring
进入JobHunting版参与讨论
n****e
发帖数: 678
11
还是没有太懂,能展开仔细讲讲吗?
多谢!

【在 l*n 的大作中提到】
: http://zh.wikipedia.org/wiki/UTF-8#UTF-8.E7.9A.84.E7.B7.A8.E7.A
: 这面试的时候谁能想到啊...

l*n
发帖数: 529
12
看表,就是当下字符占几个位置是由第一个char的前几位确定的。

【在 n****e 的大作中提到】
: 还是没有太懂,能展开仔细讲讲吗?
: 多谢!

d**********x
发帖数: 4083
13
you cannot google everything at work either.

【在 l*n 的大作中提到】
: http://zh.wikipedia.org/wiki/UTF-8#UTF-8.E7.9A.84.E7.B7.A8.E7.A
: 这面试的时候谁能想到啊...

l*n
发帖数: 529
14
工作的时候你有时间去找巨人的肩膀啊,没说全都靠google解决,但是不先找找巨人的
肩膀自己直接山寨一个,对于未来不更坏事儿吗?做正确的事情比正确的做事情靠谱多
了。

【在 d**********x 的大作中提到】
: you cannot google everything at work either.
d**********x
发帖数: 4083
15
if you do not have systemetical knowledge, you may end up asking questions
and googling and spend days to struggling with these basics.
even you do not have an idea of the detail of UTF8 implementation - which is
almost the standard encoding nowadays, there is no excuse that you know
nothing about what is an encoding.

【在 l*n 的大作中提到】
: 工作的时候你有时间去找巨人的肩膀啊,没说全都靠google解决,但是不先找找巨人的
: 肩膀自己直接山寨一个,对于未来不更坏事儿吗?做正确的事情比正确的做事情靠谱多
: 了。

s********u
发帖数: 1109
16
I know what you mean, and I did mention a pretty rough way of decoding: use
a special character like '_'to parse the unicodes.So now I should get
rejected because this is different from the real implementation detail?

is

【在 d**********x 的大作中提到】
: if you do not have systemetical knowledge, you may end up asking questions
: and googling and spend days to struggling with these basics.
: even you do not have an idea of the detail of UTF8 implementation - which is
: almost the standard encoding nowadays, there is no excuse that you know
: nothing about what is an encoding.

d**********x
发帖数: 4083
17
while i do not think so, googler may have other opinions.

use

【在 s********u 的大作中提到】
: I know what you mean, and I did mention a pretty rough way of decoding: use
: a special character like '_'to parse the unicodes.So now I should get
: rejected because this is different from the real implementation detail?
:
: is

u*****o
发帖数: 1224
18
我觉得你说的太严重了吧。。。每个人都有自己的擅长的领域,只能说unicode考到了
lz的盲点,考另一题就完全可能答的很好。再说面试表现和工作表现也是两回事吧。

is

【在 d**********x 的大作中提到】
: if you do not have systemetical knowledge, you may end up asking questions
: and googling and spend days to struggling with these basics.
: even you do not have an idea of the detail of UTF8 implementation - which is
: almost the standard encoding nowadays, there is no excuse that you know
: nothing about what is an encoding.

T*******e
发帖数: 4928
19
我们找工作的基本都被拒过。 把这次没答出的题弄懂,当练练手,下次遇到类似的
你就赚了。赶快准备别家的面试吧。
d**********x
发帖数: 4083
20
just because utf8 is so basic. if you love programming and you are chinese,
you cannot ignore utf8. or at least you should know something about gb2312
gbk.
while i do not think it should be a reason to reject people from my standard
, i can have a good understanding why people may be rejected because of this.

【在 u*****o 的大作中提到】
: 我觉得你说的太严重了吧。。。每个人都有自己的擅长的领域,只能说unicode考到了
: lz的盲点,考另一题就完全可能答的很好。再说面试表现和工作表现也是两回事吧。
:
: is

相关主题
一道linkedin的题。热腾腾的hulu面经
[合集] ASCII字符发音总结find first nonduplicate unicode questions
弱问一个关于字符类型转换的一个问题问一道题(8)
进入JobHunting版参与讨论
s********u
发帖数: 1109
21
其实比较烦心的还是,apple考了我个linux指令,google考了我个unicode,这些我都
可以去看,但就是不知道自己还缺什么。或者说这些也只是个案,以后还会被考到别的
或者根本不会考。
以前一直是拿cc150当范本,上面提的东西都尽量去补,何奈很多周边知识不是cs专业
,还是很多疏漏。

【在 T*******e 的大作中提到】
: 我们找工作的基本都被拒过。 把这次没答出的题弄懂,当练练手,下次遇到类似的
: 你就赚了。赶快准备别家的面试吧。
:

d**********x
发帖数: 4083
22
especially the G company which is infamously picky.

,
standard
this.

【在 d**********x 的大作中提到】
: just because utf8 is so basic. if you love programming and you are chinese,
: you cannot ignore utf8. or at least you should know something about gb2312
: gbk.
: while i do not think it should be a reason to reject people from my standard
: , i can have a good understanding why people may be rejected because of this.

d**********x
发帖数: 4083
23
you have good cs fundamentals, you just need some luck next time

【在 s********u 的大作中提到】
: 其实比较烦心的还是,apple考了我个linux指令,google考了我个unicode,这些我都
: 可以去看,但就是不知道自己还缺什么。或者说这些也只是个案,以后还会被考到别的
: 或者根本不会考。
: 以前一直是拿cc150当范本,上面提的东西都尽量去补,何奈很多周边知识不是cs专业
: ,还是很多疏漏。

s********u
发帖数: 1109
24
Well, I would admit my 学艺不精。The problem is, how would I know my blind
spots?That is, if this belongs to "common sense",I would really appreciate
if someone can let me know the range of 'common sense'.

,
standard
this.

【在 d**********x 的大作中提到】
: just because utf8 is so basic. if you love programming and you are chinese,
: you cannot ignore utf8. or at least you should know something about gb2312
: gbk.
: while i do not think it should be a reason to reject people from my standard
: , i can have a good understanding why people may be rejected because of this.

s********u
发帖数: 1109
25
Thx! I think I'm prepared,just worried if I can get more interview chances
like these from now on

【在 d**********x 的大作中提到】
: you have good cs fundamentals, you just need some luck next time
b**********5
发帖数: 7881
26
I am chinese, but i dont fucking program for chinese... in fact, i barely
know any freaking technical terms in chinese...

,
standard
this.

【在 d**********x 的大作中提到】
: just because utf8 is so basic. if you love programming and you are chinese,
: you cannot ignore utf8. or at least you should know something about gb2312
: gbk.
: while i do not think it should be a reason to reject people from my standard
: , i can have a good understanding why people may be rejected because of this.

d**********x
发帖数: 4083
27
that may require years of practice in software development.
but to enter a good software company, you just need more luck. it's a
different story :D

【在 s********u 的大作中提到】
: Well, I would admit my 学艺不精。The problem is, how would I know my blind
: spots?That is, if this belongs to "common sense",I would really appreciate
: if someone can let me know the range of 'common sense'.
:
: ,
: standard
: this.

d**********x
发帖数: 4083
28
do you know about i18n?

【在 b**********5 的大作中提到】
: I am chinese, but i dont fucking program for chinese... in fact, i barely
: know any freaking technical terms in chinese...
:
: ,
: standard
: this.

s********u
发帖数: 1109
29
some terms in Chinese might be pretty hard to understand I would admit.Like,
what the hell is "句柄”?

【在 b**********5 的大作中提到】
: I am chinese, but i dont fucking program for chinese... in fact, i barely
: know any freaking technical terms in chinese...
:
: ,
: standard
: this.

d**********x
发帖数: 4083
30
handle.
that's a fucking bad translation. same for inline -- zai xian (....)

Like,
barely

【在 s********u 的大作中提到】
: some terms in Chinese might be pretty hard to understand I would admit.Like,
: what the hell is "句柄”?

相关主题
这个题有什么好方法吗?Google实习第一轮电话面试总结
google 电面贡献两道的面试题
Google Intern面经顺求bless~amazon 第一轮电话面试
进入JobHunting版参与讨论
b**********5
发帖数: 7881
31
now u know CS is not that easy... the best route is to enter one of those
FLAGT, even ebay, msft companies, and then work on a hot technology, then
after couple years, u can get a real big package. Those fresh graduate who
got into FLAGT aren't necessarily better than u, maybe the timing, maybe
they got lucky with the questions.
But if u are unlucky after graduation, or just didn't care about hot tech
companies after graduation, then u work for several years in a cold-tech
company, then good luck. It would be even harder to switch to a hot tech
company as an "experienced"...

【在 s********u 的大作中提到】
: Well, I would admit my 学艺不精。The problem is, how would I know my blind
: spots?That is, if this belongs to "common sense",I would really appreciate
: if someone can let me know the range of 'common sense'.
:
: ,
: standard
: this.

s********u
发帖数: 1109
32
Okay, now comes your theory, "it's all about luck"
I won't buy this anyway.I would say: if I were as competitive as 大牛s like
2爷,I can enter any of these companies easily.Other than that, there might
be some luck.
By the way, I still don't think you got rejected( if this happens ) just
because you are experienced.It doesnt make any sense.

who

【在 b**********5 的大作中提到】
: now u know CS is not that easy... the best route is to enter one of those
: FLAGT, even ebay, msft companies, and then work on a hot technology, then
: after couple years, u can get a real big package. Those fresh graduate who
: got into FLAGT aren't necessarily better than u, maybe the timing, maybe
: they got lucky with the questions.
: But if u are unlucky after graduation, or just didn't care about hot tech
: companies after graduation, then u work for several years in a cold-tech
: company, then good luck. It would be even harder to switch to a hot tech
: company as an "experienced"...

l*n
发帖数: 529
33
算了别想了,说不定过了呢。想地毯式扫描的话,还不如不干IT了。律师该是对法条要
熟稔吧,可是在法庭上连法官都要有一本statute。

【在 s********u 的大作中提到】
: Well, I would admit my 学艺不精。The problem is, how would I know my blind
: spots?That is, if this belongs to "common sense",I would really appreciate
: if someone can let me know the range of 'common sense'.
:
: ,
: standard
: this.

b**********5
发帖数: 7881
34
no, i never said it's all about luck. Those fresh grad who enter hot tech
companies are good, some maybe execellent. But so are many other "good"
fresh grads who didn't get to enter those hot tech companies.
regarding the experienced shit, u will understand when u have some
experience urself. First, as an experienced, ur interview questions are
harder. secondly, people tend to either hire a clean slate (fresh grad
hires) or someone with a very similar experience (experienced hires). For
experienced hires, people tend to look at what u've done, what industry u've
been... and of course, when people look at me, they wonder why is she
still a bottom feeding IT tech...

like

【在 s********u 的大作中提到】
: Okay, now comes your theory, "it's all about luck"
: I won't buy this anyway.I would say: if I were as competitive as 大牛s like
: 2爷,I can enter any of these companies easily.Other than that, there might
: be some luck.
: By the way, I still don't think you got rejected( if this happens ) just
: because you are experienced.It doesnt make any sense.
:
: who

c*********s
发帖数: 385
35
额,inline翻译成“内联”,online是在线
术语只是习惯问题,形成映射就好了。

【在 d**********x 的大作中提到】
: handle.
: that's a fucking bad translation. same for inline -- zai xian (....)
:
: Like,
: barely

s********u
发帖数: 1109
36
内联也不直观。总之大多数的翻译版编程书,都不易懂。更不用说谭浩强那种误人子弟的

【在 c*********s 的大作中提到】
: 额,inline翻译成“内联”,online是在线
: 术语只是习惯问题,形成映射就好了。

n****e
发帖数: 678
37
关键是我怎么确定这个是UTF-8呢,
一般的CHAR也是1 byte啊,最高几位位也有可能和UTF-8的第一个char的最高几位相同
的啊

【在 l*n 的大作中提到】
: 看表,就是当下字符占几个位置是由第一个char的前几位确定的。
s********u
发帖数: 1109
38
这个编码方式至少会告诉你,不会跟ascii混淆。

【在 n****e 的大作中提到】
: 关键是我怎么确定这个是UTF-8呢,
: 一般的CHAR也是1 byte啊,最高几位位也有可能和UTF-8的第一个char的最高几位相同
: 的啊

n****e
发帖数: 678
39
哦,这样啊,楼主加油!谢谢你Apple, Google的面经,说实话,确实问的题目偏了一
些。
只要努力,一定会有offer的。

【在 s********u 的大作中提到】
: 这个编码方式至少会告诉你,不会跟ascii混淆。
i*******e
发帖数: 69
40
ㅈㅏㅇㅏ != 장ㅏ这是啥。。。
相关主题
amazon 第一轮电话面试Google的面经
请问下那个查找包含给定字符的最短子串咋做?顶风上来问道题:一个很大char[], 如何in-place 删除重复元素
Find first non-repeating char怎么做?A家电面题
进入JobHunting版参与讨论
s********u
发帖数: 1109
41
这是韩文。你看前三个字符合在一起正好是第二个的第一个字符。。
意思就是说比如ab是一个unicode,cd也是,但abcd也可能是

【在 i*******e 的大作中提到】
: ㅈㅏㅇㅏ != 장ㅏ这是啥。。。
g*********e
发帖数: 14401
42

well said.

【在 d**********x 的大作中提到】
: that may require years of practice in software development.
: but to enter a good software company, you just need more luck. it's a
: different story :D

r******j
发帖数: 92
43
楼主,加油,坚持你现在所做的,再把遇到的自己不会的知识,wiki,google,
stackoverflow都搞明白了。再过几次面试,你就都遇到自己“拿手”的题目了。
d**********x
发帖数: 4083
44
it is hard to tell how people encode a file, without extra information.

【在 n****e 的大作中提到】
: 关键是我怎么确定这个是UTF-8呢,
: 一般的CHAR也是1 byte啊,最高几位位也有可能和UTF-8的第一个char的最高几位相同
: 的啊

d**********x
发帖数: 4083
45
check the translation of c++ programming language by Zongyan Pei....
inline -- zaixian

【在 c*********s 的大作中提到】
: 额,inline翻译成“内联”,online是在线
: 术语只是习惯问题,形成映射就好了。

q******8
发帖数: 848
46
感谢lz的面经,非常好的题目。
吐槽一下几个人的回帖,人家把面经post上来,讨论一下,大家给各自的意见,但是不
知道某些人的回帖是啥意思?觉得lz太弱,想找点自信?觉得这么简单的题都答不对,
着急?你要不就给code,idea,干啥一幅面试官的样子,受不了。这种语气估计lz下次
也不会再发面经了
c********p
发帖数: 1969
47
我看错了么。。。是韩文么?
s********u
发帖数: 1109
48
各种不顺,早上apple来了拒信,下午google面的也不好,阿森纳还输球。。
可能还是沟通能力太差了,应该是很简单的题目,就是不知道他想说什么。
我发觉面试相比leetcode一大难度就是有时候面试官会说的比较vague,要靠自己问。
。要是他每次都直接把题目书写出来,倒是方便多了。。
就是实现一个strchr,只不过第二个参数不是字符,而是字符串,返回第一次出现的指
针。
/*
Find the first occurrence in str of _any_ character in set. Both are NULL
terminated ASCII C-strings. This is like strchr, except that the second
parameter functions as a set, rather than a single character.
str set returns
qxcdef csz str + 2 == &str[2]
axcdef wya str + 0 == &str[0]
axcdef cxa str + 0 == &str[0]
abc efg NULL
*/
这个就用一个hashtable做就可以了。结果麻烦开始了,他说用unicode怎么样,结果我
对unicode完全不了解,他就开始解释,就说unicode一个字符可能用1-5个char来表示
?那我就说假设有一个table帮你判定是不是unicode,那么就像wordbreak那个题一样
,往前走 碰到完整的unicode就记下来。
结果他说
ㅈㅏㅇㅏ != 장ㅏ
那我说怎么确定这个字符串的分割方式啊。。弄了半天。。然后他又说用_分割,因为
时间很紧张了,我就照这个意思简单地写了下code。应该让他举一个完整的例子的。写
完了他有点不置可否。
可能是因为时间不够,就用了10多分钟问了些简历,回答的也不算很好,就结束了。
有人能讲讲unicode用c字符串来表示是怎么个情况么。。
结果的话,估计是攒rp了。
c*******i
发帖数: 160
49
unicode不能直接brute force 扫吗?

【在 s********u 的大作中提到】
: 各种不顺,早上apple来了拒信,下午google面的也不好,阿森纳还输球。。
: 可能还是沟通能力太差了,应该是很简单的题目,就是不知道他想说什么。
: 我发觉面试相比leetcode一大难度就是有时候面试官会说的比较vague,要靠自己问。
: 。要是他每次都直接把题目书写出来,倒是方便多了。。
: 就是实现一个strchr,只不过第二个参数不是字符,而是字符串,返回第一次出现的指
: 针。
: /*
: Find the first occurrence in str of _any_ character in set. Both are NULL
: terminated ASCII C-strings. This is like strchr, except that the second
: parameter functions as a set, rather than a single character.

s********u
发帖数: 1109
50
好像是一个unicode对应多个char。而且比如ab是一个unicode,cd是一个unicode,但
是abcd也可能是一个unicode,所以他一直在跟我解释怎么标记这些。但肯定有办法区
分的,否则就不是唯一了,那还怎么表示字符啊,又不是word break问题。应该多由我
来问
的,这些更清楚些。
最后也不知道是不是到底这意思。

【在 c*******i 的大作中提到】
: unicode不能直接brute force 扫吗?
相关主题
G家电面被拒,请帮助分析原因[合集] ASCII字符发音总结
Minimum Window Substring弱问一个关于字符类型转换的一个问题
一道linkedin的题。热腾腾的hulu面经
进入JobHunting版参与讨论
w*****e
发帖数: 931
51
但是怎么知道一个char是单独的还是一个字符的一部分?java 里倒是现成的。

【在 c*******i 的大作中提到】
: unicode不能直接brute force 扫吗?
s********u
发帖数: 1109
52
是啊,最后我不管了,就当是有个结束符_,但这样好像又太简单了。。但想不出其他
办法,我觉得他可能是想让我稍微设计下的。那就算设计,我也会设计成这样。。

【在 w*****e 的大作中提到】
: 但是怎么知道一个char是单独的还是一个字符的一部分?java 里倒是现成的。
J****3
发帖数: 427
53
ㅈㅏㅇㅏ != 장ㅏ这是啥。。。
x*****s
发帖数: 125
54
题目含糊也是考点之一,dealing with ambiguity是工程师必备的技能啊,如果一切都
清清楚楚,找个机器人来做不就好了
unicode本身只是一个号码,编码才决定了它在内存中的大小,utf-8就是变长的(你的
面试官给的例子),utf-16则是定长的(固定4字节)
d**********x
发帖数: 4083
55
read something about UTF8.
Unicode is a mapping, UTF8, UTF16, ... are encoding/implementation of the
mapping.

【在 s********u 的大作中提到】
: 好像是一个unicode对应多个char。而且比如ab是一个unicode,cd是一个unicode,但
: 是abcd也可能是一个unicode,所以他一直在跟我解释怎么标记这些。但肯定有办法区
: 分的,否则就不是唯一了,那还怎么表示字符啊,又不是word break问题。应该多由我
: 来问
: 的,这些更清楚些。
: 最后也不知道是不是到底这意思。

f******n
发帖数: 208
56
以UTF-8为例,一个字符可以由1~4个char组成,通过查第一个字节可以判断该字符总共
有几个字节(其设计类似哈弗曼编码)。
1)构建哈希表的时候,先确定当前字符是几个字节,比如4个,那就把这4个当成一个
字符串,作为key存入哈希。然后跳过这四个字节,继续往前走。
2)扫描字符串的时候同理。
l*n
发帖数: 529
57
http://zh.wikipedia.org/wiki/UTF-8#UTF-8.E7.9A.84.E7.B7.A8.E7.A
这面试的时候谁能想到啊...

【在 f******n 的大作中提到】
: 以UTF-8为例,一个字符可以由1~4个char组成,通过查第一个字节可以判断该字符总共
: 有几个字节(其设计类似哈弗曼编码)。
: 1)构建哈希表的时候,先确定当前字符是几个字节,比如4个,那就把这4个当成一个
: 字符串,作为key存入哈希。然后跳过这四个字节,继续往前走。
: 2)扫描字符串的时候同理。

n****e
发帖数: 678
58
还是没有太懂,能展开仔细讲讲吗?
多谢!

【在 l*n 的大作中提到】
: http://zh.wikipedia.org/wiki/UTF-8#UTF-8.E7.9A.84.E7.B7.A8.E7.A
: 这面试的时候谁能想到啊...

l*n
发帖数: 529
59
看表,就是当下字符占几个位置是由第一个char的前几位确定的。

【在 n****e 的大作中提到】
: 还是没有太懂,能展开仔细讲讲吗?
: 多谢!

d**********x
发帖数: 4083
60
you cannot google everything at work either.

【在 l*n 的大作中提到】
: http://zh.wikipedia.org/wiki/UTF-8#UTF-8.E7.9A.84.E7.B7.A8.E7.A
: 这面试的时候谁能想到啊...

相关主题
find first nonduplicate unicode questionsgoogle 电面
问一道题(8)Google Intern面经顺求bless~
这个题有什么好方法吗?Google实习第一轮电话面试总结
进入JobHunting版参与讨论
l*n
发帖数: 529
61
工作的时候你有时间去找巨人的肩膀啊,没说全都靠google解决,但是不先找找巨人的
肩膀自己直接山寨一个,对于未来不更坏事儿吗?做正确的事情比正确的做事情靠谱多
了。

【在 d**********x 的大作中提到】
: you cannot google everything at work either.
d**********x
发帖数: 4083
62
if you do not have systemetical knowledge, you may end up asking questions
and googling and spend days to struggling with these basics.
even you do not have an idea of the detail of UTF8 implementation - which is
almost the standard encoding nowadays, there is no excuse that you know
nothing about what is an encoding.

【在 l*n 的大作中提到】
: 工作的时候你有时间去找巨人的肩膀啊,没说全都靠google解决,但是不先找找巨人的
: 肩膀自己直接山寨一个,对于未来不更坏事儿吗?做正确的事情比正确的做事情靠谱多
: 了。

s********u
发帖数: 1109
63
I know what you mean, and I did mention a pretty rough way of decoding: use
a special character like '_'to parse the unicodes.So now I should get
rejected because this is different from the real implementation detail?

is

【在 d**********x 的大作中提到】
: if you do not have systemetical knowledge, you may end up asking questions
: and googling and spend days to struggling with these basics.
: even you do not have an idea of the detail of UTF8 implementation - which is
: almost the standard encoding nowadays, there is no excuse that you know
: nothing about what is an encoding.

d**********x
发帖数: 4083
64
while i do not think so, googler may have other opinions.

use

【在 s********u 的大作中提到】
: I know what you mean, and I did mention a pretty rough way of decoding: use
: a special character like '_'to parse the unicodes.So now I should get
: rejected because this is different from the real implementation detail?
:
: is

u*****o
发帖数: 1224
65
我觉得你说的太严重了吧。。。每个人都有自己的擅长的领域,只能说unicode考到了
lz的盲点,考另一题就完全可能答的很好。再说面试表现和工作表现也是两回事吧。

is

【在 d**********x 的大作中提到】
: if you do not have systemetical knowledge, you may end up asking questions
: and googling and spend days to struggling with these basics.
: even you do not have an idea of the detail of UTF8 implementation - which is
: almost the standard encoding nowadays, there is no excuse that you know
: nothing about what is an encoding.

T*******e
发帖数: 4928
66
我们找工作的基本都被拒过。 把这次没答出的题弄懂,当练练手,下次遇到类似的
你就赚了。赶快准备别家的面试吧。
d**********x
发帖数: 4083
67
just because utf8 is so basic. if you love programming and you are chinese,
you cannot ignore utf8. or at least you should know something about gb2312
gbk.
while i do not think it should be a reason to reject people from my standard
, i can have a good understanding why people may be rejected because of this.

【在 u*****o 的大作中提到】
: 我觉得你说的太严重了吧。。。每个人都有自己的擅长的领域,只能说unicode考到了
: lz的盲点,考另一题就完全可能答的很好。再说面试表现和工作表现也是两回事吧。
:
: is

s********u
发帖数: 1109
68
其实比较烦心的还是,apple考了我个linux指令,google考了我个unicode,这些我都
可以去看,但就是不知道自己还缺什么。或者说这些也只是个案,以后还会被考到别的
或者根本不会考。
以前一直是拿cc150当范本,上面提的东西都尽量去补,何奈很多周边知识不是cs专业
,还是很多疏漏。

【在 T*******e 的大作中提到】
: 我们找工作的基本都被拒过。 把这次没答出的题弄懂,当练练手,下次遇到类似的
: 你就赚了。赶快准备别家的面试吧。
:

d**********x
发帖数: 4083
69
especially the G company which is infamously picky.

,
standard
this.

【在 d**********x 的大作中提到】
: just because utf8 is so basic. if you love programming and you are chinese,
: you cannot ignore utf8. or at least you should know something about gb2312
: gbk.
: while i do not think it should be a reason to reject people from my standard
: , i can have a good understanding why people may be rejected because of this.

d**********x
发帖数: 4083
70
you have good cs fundamentals, you just need some luck next time

【在 s********u 的大作中提到】
: 其实比较烦心的还是,apple考了我个linux指令,google考了我个unicode,这些我都
: 可以去看,但就是不知道自己还缺什么。或者说这些也只是个案,以后还会被考到别的
: 或者根本不会考。
: 以前一直是拿cc150当范本,上面提的东西都尽量去补,何奈很多周边知识不是cs专业
: ,还是很多疏漏。

相关主题
Google实习第一轮电话面试总结请问下那个查找包含给定字符的最短子串咋做?
贡献两道的面试题Find first non-repeating char怎么做?
amazon 第一轮电话面试Google的面经
进入JobHunting版参与讨论
s********u
发帖数: 1109
71
Well, I would admit my 学艺不精。The problem is, how would I know my blind
spots?That is, if this belongs to "common sense",I would really appreciate
if someone can let me know the range of 'common sense'.

,
standard
this.

【在 d**********x 的大作中提到】
: just because utf8 is so basic. if you love programming and you are chinese,
: you cannot ignore utf8. or at least you should know something about gb2312
: gbk.
: while i do not think it should be a reason to reject people from my standard
: , i can have a good understanding why people may be rejected because of this.

s********u
发帖数: 1109
72
Thx! I think I'm prepared,just worried if I can get more interview chances
like these from now on

【在 d**********x 的大作中提到】
: you have good cs fundamentals, you just need some luck next time
b**********5
发帖数: 7881
73
I am chinese, but i dont fucking program for chinese... in fact, i barely
know any freaking technical terms in chinese...

,
standard
this.

【在 d**********x 的大作中提到】
: just because utf8 is so basic. if you love programming and you are chinese,
: you cannot ignore utf8. or at least you should know something about gb2312
: gbk.
: while i do not think it should be a reason to reject people from my standard
: , i can have a good understanding why people may be rejected because of this.

d**********x
发帖数: 4083
74
that may require years of practice in software development.
but to enter a good software company, you just need more luck. it's a
different story :D

【在 s********u 的大作中提到】
: Well, I would admit my 学艺不精。The problem is, how would I know my blind
: spots?That is, if this belongs to "common sense",I would really appreciate
: if someone can let me know the range of 'common sense'.
:
: ,
: standard
: this.

d**********x
发帖数: 4083
75
do you know about i18n?

【在 b**********5 的大作中提到】
: I am chinese, but i dont fucking program for chinese... in fact, i barely
: know any freaking technical terms in chinese...
:
: ,
: standard
: this.

s********u
发帖数: 1109
76
some terms in Chinese might be pretty hard to understand I would admit.Like,
what the hell is "句柄”?

【在 b**********5 的大作中提到】
: I am chinese, but i dont fucking program for chinese... in fact, i barely
: know any freaking technical terms in chinese...
:
: ,
: standard
: this.

d**********x
发帖数: 4083
77
handle.
that's a fucking bad translation. same for inline -- zai xian (....)

Like,
barely

【在 s********u 的大作中提到】
: some terms in Chinese might be pretty hard to understand I would admit.Like,
: what the hell is "句柄”?

b**********5
发帖数: 7881
78
now u know CS is not that easy... the best route is to enter one of those
FLAGT, even ebay, msft companies, and then work on a hot technology, then
after couple years, u can get a real big package. Those fresh graduate who
got into FLAGT aren't necessarily better than u, maybe the timing, maybe
they got lucky with the questions.
But if u are unlucky after graduation, or just didn't care about hot tech
companies after graduation, then u work for several years in a cold-tech
company, then good luck. It would be even harder to switch to a hot tech
company as an "experienced"...

【在 s********u 的大作中提到】
: Well, I would admit my 学艺不精。The problem is, how would I know my blind
: spots?That is, if this belongs to "common sense",I would really appreciate
: if someone can let me know the range of 'common sense'.
:
: ,
: standard
: this.

s********u
发帖数: 1109
79
Okay, now comes your theory, "it's all about luck"
I won't buy this anyway.I would say: if I were as competitive as 大牛s like
2爷,I can enter any of these companies easily.Other than that, there might
be some luck.
By the way, I still don't think you got rejected( if this happens ) just
because you are experienced.It doesnt make any sense.

who

【在 b**********5 的大作中提到】
: now u know CS is not that easy... the best route is to enter one of those
: FLAGT, even ebay, msft companies, and then work on a hot technology, then
: after couple years, u can get a real big package. Those fresh graduate who
: got into FLAGT aren't necessarily better than u, maybe the timing, maybe
: they got lucky with the questions.
: But if u are unlucky after graduation, or just didn't care about hot tech
: companies after graduation, then u work for several years in a cold-tech
: company, then good luck. It would be even harder to switch to a hot tech
: company as an "experienced"...

l*n
发帖数: 529
80
算了别想了,说不定过了呢。想地毯式扫描的话,还不如不干IT了。律师该是对法条要
熟稔吧,可是在法庭上连法官都要有一本statute。

【在 s********u 的大作中提到】
: Well, I would admit my 学艺不精。The problem is, how would I know my blind
: spots?That is, if this belongs to "common sense",I would really appreciate
: if someone can let me know the range of 'common sense'.
:
: ,
: standard
: this.

相关主题
顶风上来问道题:一个很大char[], 如何in-place 删除重复元素Minimum Window Substring
A家电面题一道linkedin的题。
G家电面被拒,请帮助分析原因[合集] ASCII字符发音总结
进入JobHunting版参与讨论
b**********5
发帖数: 7881
81
no, i never said it's all about luck. Those fresh grad who enter hot tech
companies are good, some maybe execellent. But so are many other "good"
fresh grads who didn't get to enter those hot tech companies.
regarding the experienced shit, u will understand when u have some
experience urself. First, as an experienced, ur interview questions are
harder. secondly, people tend to either hire a clean slate (fresh grad
hires) or someone with a very similar experience (experienced hires). For
experienced hires, people tend to look at what u've done, what industry u've
been... and of course, when people look at me, they wonder why is she
still a bottom feeding IT tech...

like

【在 s********u 的大作中提到】
: Okay, now comes your theory, "it's all about luck"
: I won't buy this anyway.I would say: if I were as competitive as 大牛s like
: 2爷,I can enter any of these companies easily.Other than that, there might
: be some luck.
: By the way, I still don't think you got rejected( if this happens ) just
: because you are experienced.It doesnt make any sense.
:
: who

c*********s
发帖数: 385
82
额,inline翻译成“内联”,online是在线
术语只是习惯问题,形成映射就好了。

【在 d**********x 的大作中提到】
: handle.
: that's a fucking bad translation. same for inline -- zai xian (....)
:
: Like,
: barely

s********u
发帖数: 1109
83
内联也不直观。总之大多数的翻译版编程书,都不易懂。更不用说谭浩强那种误人子弟的

【在 c*********s 的大作中提到】
: 额,inline翻译成“内联”,online是在线
: 术语只是习惯问题,形成映射就好了。

n****e
发帖数: 678
84
关键是我怎么确定这个是UTF-8呢,
一般的CHAR也是1 byte啊,最高几位位也有可能和UTF-8的第一个char的最高几位相同
的啊

【在 l*n 的大作中提到】
: 看表,就是当下字符占几个位置是由第一个char的前几位确定的。
s********u
发帖数: 1109
85
这个编码方式至少会告诉你,不会跟ascii混淆。

【在 n****e 的大作中提到】
: 关键是我怎么确定这个是UTF-8呢,
: 一般的CHAR也是1 byte啊,最高几位位也有可能和UTF-8的第一个char的最高几位相同
: 的啊

n****e
发帖数: 678
86
哦,这样啊,楼主加油!谢谢你Apple, Google的面经,说实话,确实问的题目偏了一
些。
只要努力,一定会有offer的。

【在 s********u 的大作中提到】
: 这个编码方式至少会告诉你,不会跟ascii混淆。
i*******e
发帖数: 69
87
ㅈㅏㅇㅏ != 장ㅏ这是啥。。。
s********u
发帖数: 1109
88
这是韩文。你看前三个字符合在一起正好是第二个的第一个字符。。
意思就是说比如ab是一个unicode,cd也是,但abcd也可能是

【在 i*******e 的大作中提到】
: ㅈㅏㅇㅏ != 장ㅏ这是啥。。。
g*********e
发帖数: 14401
89

well said.

【在 d**********x 的大作中提到】
: that may require years of practice in software development.
: but to enter a good software company, you just need more luck. it's a
: different story :D

r******j
发帖数: 92
90
楼主,加油,坚持你现在所做的,再把遇到的自己不会的知识,wiki,google,
stackoverflow都搞明白了。再过几次面试,你就都遇到自己“拿手”的题目了。
相关主题
弱问一个关于字符类型转换的一个问题问一道题(8)
热腾腾的hulu面经这个题有什么好方法吗?
find first nonduplicate unicode questionsgoogle 电面
进入JobHunting版参与讨论
d**********x
发帖数: 4083
91
it is hard to tell how people encode a file, without extra information.

【在 n****e 的大作中提到】
: 关键是我怎么确定这个是UTF-8呢,
: 一般的CHAR也是1 byte啊,最高几位位也有可能和UTF-8的第一个char的最高几位相同
: 的啊

d**********x
发帖数: 4083
92
check the translation of c++ programming language by Zongyan Pei....
inline -- zaixian

【在 c*********s 的大作中提到】
: 额,inline翻译成“内联”,online是在线
: 术语只是习惯问题,形成映射就好了。

q******8
发帖数: 848
93
感谢lz的面经,非常好的题目。
吐槽一下几个人的回帖,人家把面经post上来,讨论一下,大家给各自的意见,但是不
知道某些人的回帖是啥意思?觉得lz太弱,想找点自信?觉得这么简单的题都答不对,
着急?你要不就给code,idea,干啥一幅面试官的样子,受不了。这种语气估计lz下次
也不会再发面经了
c********p
发帖数: 1969
94
我看错了么。。。是韩文么?
n*****f
发帖数: 17
95
我觉得面试官只是想看你了不了解encoding,只要了解一些能跟他扯就好了。
推荐一篇文章
http://kunststube.net/encoding/
1 (共1页)
进入JobHunting版参与讨论
相关主题
find first nonduplicate unicode questions请问下那个查找包含给定字符的最短子串咋做?
问一道题(8)Find first non-repeating char怎么做?
这个题有什么好方法吗?Google的面经
google 电面顶风上来问道题:一个很大char[], 如何in-place 删除重复元素
Google Intern面经顺求bless~A家电面题
Google实习第一轮电话面试总结G家电面被拒,请帮助分析原因
贡献两道的面试题Minimum Window Substring
amazon 第一轮电话面试一道linkedin的题。
相关话题的讨论汇总
话题: unicode话题: 12623话题: str话题: utf8话题: know