报点面经L & Square, 以及Netflix的recruiter经# JobHunting - 待字闺中
l*g
1 楼
报点最近的面经,都是电面中的,攒点rp顺便求bless!
L家的:
1. Given two (dictionary) words as Strings, determine if they are isomorphic
. Two words are called isomorphic if the letters in one word can be remapped
to get the second word. Remapping a letter means replacing all occurrences
of it with another letter while the ordering of the letters remains
unchanged. No two letters may map to the same letter, but a letter may map
to itself.
Example:
Given "foo", "app"; returns true
we can map 'f' -> 'a' and 'o' -> 'p'
Given "bar", "foo"; returns false
we can't map both 'a' and 'r' to 'o'
Given "turtle", "tletur"; returns true
we can map 't' -> 't', 'u' -> 'l', 'r' -> 'e', 'l' -> 'u', 'e' -'r'
Given "ab", "ca"; returns true
we can map 'a' -> 'c', 'b'
2. 输出整数分解的全部解,解要从大到小的输出
Example:
input: n = 12
output:
12*1
6*2
4*3
3*2*2
Square家的:
Design class Formula and all the required interfaces. 这个Formula是要
construct出a || (b && c)这样结构的,而evaluate function的第二个input para是a
=true; b=false; c= true这样的values的。
class Formula
public Formula or(Formula f1, Formula f2);
public Formula and(Formula f1, Formula f2);
public Formula not(Formula f);
public Formula init(String var);
public boolean evaluate(Formula f, Map values);
Netflix的recruiter:
第一次见到recruiter的information phone call就会问问题的。互相寒暄自己介绍和
讨论过CEO的那个culture slides之后,连问了四个问题。
1. Singleton pattern
2. Map有几种implementation
3. Linux command line
4. http error code, e.g. 500对应的error message, 404对应的error message
L家的:
1. Given two (dictionary) words as Strings, determine if they are isomorphic
. Two words are called isomorphic if the letters in one word can be remapped
to get the second word. Remapping a letter means replacing all occurrences
of it with another letter while the ordering of the letters remains
unchanged. No two letters may map to the same letter, but a letter may map
to itself.
Example:
Given "foo", "app"; returns true
we can map 'f' -> 'a' and 'o' -> 'p'
Given "bar", "foo"; returns false
we can't map both 'a' and 'r' to 'o'
Given "turtle", "tletur"; returns true
we can map 't' -> 't', 'u' -> 'l', 'r' -> 'e', 'l' -> 'u', 'e' -'r'
Given "ab", "ca"; returns true
we can map 'a' -> 'c', 'b'
2. 输出整数分解的全部解,解要从大到小的输出
Example:
input: n = 12
output:
12*1
6*2
4*3
3*2*2
Square家的:
Design class Formula and all the required interfaces. 这个Formula是要
construct出a || (b && c)这样结构的,而evaluate function的第二个input para是a
=true; b=false; c= true这样的values的。
class Formula
public Formula or(Formula f1, Formula f2);
public Formula and(Formula f1, Formula f2);
public Formula not(Formula f);
public Formula init(String var);
public boolean evaluate(Formula f, Map
Netflix的recruiter:
第一次见到recruiter的information phone call就会问问题的。互相寒暄自己介绍和
讨论过CEO的那个culture slides之后,连问了四个问题。
1. Singleton pattern
2. Map有几种implementation
3. Linux command line
4. http error code, e.g. 500对应的error message, 404对应的error message