贡献一个M家的电面题# JobHunting - 待字闺中
d*k
1 楼
感觉还可以,说很快会给答复,面试官是个很帅的白人小伙子,很和蔼
是web组,所以开始问得是web题目
What core types are available in JavaScript?
A: string, number, object, null, undefined, boolean
Can you describe closure? and example?
A Describe出来了,但是example写的不好,就不贴le。是个挂点。
Alert a string after a 10 second delay
A:setTimeout(function(){‘alert(“msg”)}, 10000);
这个很惭愧,API的记得不清楚,面试管很nice的抛了个API连接过来。是个挂点。
evaluate the following expression, and explain == vs ===
“1” == 1 true
“1” === 1 false
“1” == true true
“1” === true false
Name some security threats specific to web applications
我一开始说了SQL injection,人说不是web specific的
后来说了not authenticate, not authorized, browser cookie theft,还有user put
malicious JS code in the input.
后来想到cross site forgery应该也是一个。
没说全但是应该不是挂点。
编程题:
Find the difference in height between the shallowest leaf node and deepest
leaf node in a binary tree.
Note: Binary trees are very deep
说了可以BFS, DFS, and recursion, 每一个的思路都说了,然后因为树很长,决定用
BFS做,做完貌似还满意。
是web组,所以开始问得是web题目
What core types are available in JavaScript?
A: string, number, object, null, undefined, boolean
Can you describe closure? and example?
A Describe出来了,但是example写的不好,就不贴le。是个挂点。
Alert a string after a 10 second delay
A:setTimeout(function(){‘alert(“msg”)}, 10000);
这个很惭愧,API的记得不清楚,面试管很nice的抛了个API连接过来。是个挂点。
evaluate the following expression, and explain == vs ===
“1” == 1 true
“1” === 1 false
“1” == true true
“1” === true false
Name some security threats specific to web applications
我一开始说了SQL injection,人说不是web specific的
后来说了not authenticate, not authorized, browser cookie theft,还有user put
malicious JS code in the input.
后来想到cross site forgery应该也是一个。
没说全但是应该不是挂点。
编程题:
Find the difference in height between the shallowest leaf node and deepest
leaf node in a binary tree.
Note: Binary trees are very deep
说了可以BFS, DFS, and recursion, 每一个的思路都说了,然后因为树很长,决定用
BFS做,做完貌似还满意。