由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 报点面经L & Square, 以及Netflix的recruiter经
相关主题
FLAG面试总结ms onsite面经
MS sdet面经 + bloomberg电面面经zenefit 电面面经
Amazon电面面经来个面经:unfair coin問題
发几个小公司的题目一个面经
vm onsite 面经顶风作案,Google面经
报点面经TripAdvsior 面经 (完败)
GOOGLE 电面面经上几个面经顺求Bless
也来攒下人品,L面经求Netflix面经,有些什么技术问题
相关话题的讨论汇总
话题: formula话题: map话题: isomorphic话题: given话题: remapped
进入JobHunting版参与讨论
1 (共1页)
l********g
发帖数: 372
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
j*******t
发帖数: 223
2
好久都没有看到square的面经了...
m******s
发帖数: 1469
3
Zan and Bless

isomorphic
remapped
occurrences

【在 l********g 的大作中提到】
: 报点最近的面经,都是电面中的,攒点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

r*******e
发帖数: 971
4
L是第几轮啊?是new grad么?
n******a
发帖数: 83
5
赞啊,学习一下,楼主背景应该很强的,能拿到这几家的面试机会
l********g
发帖数: 372
6
第一轮,不是new grad,但也没比new grad多多少经验就是了。

【在 r*******e 的大作中提到】
: L是第几轮啊?是new grad么?
s*****r
发帖数: 43070
7
还是N家最实在,全是工作中的问题
s*****r
发帖数: 43070
8
对于第一轮店面有点偏难了,估计是刷题的太多,提高难度

【在 l********g 的大作中提到】
: 第一轮,不是new grad,但也没比new grad多多少经验就是了。
t*******e
发帖数: 274
9
mark
M****l
发帖数: 416
10
bless

isomorphic
remapped
occurrences

【在 l********g 的大作中提到】
: 报点最近的面经,都是电面中的,攒点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

相关主题
报点面经ms onsite面经
GOOGLE 电面面经zenefit 电面面经
也来攒下人品,L面经来个面经:unfair coin問題
进入JobHunting版参与讨论
l********g
发帖数: 372
11
呵呵,然后老美+烙印面试官第一题自己都没搞懂,为我的hashmap的containsKey和
containsValues是否应该都check而两人互相争论+让我举例解释了好久好久,最后第
二题没写完只好果断杯具了,呵呵。

【在 s*****r 的大作中提到】
: 对于第一轮店面有点偏难了,估计是刷题的太多,提高难度
d******a
发帖数: 238
12
这个45分钟这么两道题太狠了吧。。面试官没见过自己写估计都不行。。
这第二道题有啥好的解法没?

【在 l********g 的大作中提到】
: 呵呵,然后老美+烙印面试官第一题自己都没搞懂,为我的hashmap的containsKey和
: containsValues是否应该都check而两人互相争论+让我举例解释了好久好久,最后第
: 二题没写完只好果断杯具了,呵呵。

l********g
发帖数: 372
13
我当时自己想到的是按照素因子往下除着递归。。。或者反过来先用素因子做个因式分
解成绩形式2^n * 3^m * 5^l ...形式然后再组合输出吧。。。暂时没想到别的更好的
法子

【在 d******a 的大作中提到】
: 这个45分钟这么两道题太狠了吧。。面试官没见过自己写估计都不行。。
: 这第二道题有啥好的解法没?

e*******i
发帖数: 56
14
Post a C++ solution for problem 1, assuming letters are lower case.
Any suggestions to improve? thanks
/************************************/
#include
#include
#include
bool isIso(string s, string t)
{
if(s.length()!=t.length()) return false;
vector scounter(26,0);
vector tcounter(26,0);

for(int i=0;i {
scounter[s[i]-'a']++;
tcounter[t[i]-'a']++;
}
sort( scounter.begin(), scounter.end(), greater() );
sort( tcounter.begin(), tcounter.end(), greater() );
for(int i=0;i {
if(scounter[i]!=tcounter[i]) return false;
}
return true;
}
l*****a
发帖数: 14598
15
好人,很久没看到什么最新面经了

isomorphic
remapped
occurrences

【在 l********g 的大作中提到】
: 报点最近的面经,都是电面中的,攒点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

l*****a
发帖数: 14598
16
直接dfs就好了吧

【在 l********g 的大作中提到】
: 我当时自己想到的是按照素因子往下除着递归。。。或者反过来先用素因子做个因式分
: 解成绩形式2^n * 3^m * 5^l ...形式然后再组合输出吧。。。暂时没想到别的更好的
: 法子

l*****a
发帖数: 14598
17
第二题有点小疑惑
为什么12需要*1
其他的不要,
这样似乎没法用一段code全支持
似乎12只能单独处理,大家什么意见

isomorphic
remapped
occurrences

【在 l********g 的大作中提到】
: 报点最近的面经,都是电面中的,攒点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

l*****a
发帖数: 14598
18
I wonder whether the result of example 3 for Q1 is correct or not

isomorphic
remapped
occurrences

【在 l********g 的大作中提到】
: 报点最近的面经,都是电面中的,攒点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

Q**F
发帖数: 995
19
第一题最后一个ab->ca怎么map?

isomorphic
remapped
occurrences

【在 l********g 的大作中提到】
: 报点最近的面经,都是电面中的,攒点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

l********g
发帖数: 372
20
我觉得题意是不考虑loop问题而且只看前一个word对后一个word做map,所以就是a->c,
b->a. 我貌似copy的漏了最后那个->a了,不好意思。所以只要一个map就好了

【在 l*****a 的大作中提到】
: I wonder whether the result of example 3 for Q1 is correct or not
:
: isomorphic
: remapped
: occurrences

相关主题
一个面经上几个面经顺求Bless
顶风作案,Google面经求Netflix面经,有些什么技术问题
TripAdvsior 面经 (完败)twitter和Netflix的电话面经
进入JobHunting版参与讨论
Q**F
发帖数: 995
21
所以这个是单向map?a->c 不能推出 c->a.

c,

【在 l********g 的大作中提到】
: 我觉得题意是不考虑loop问题而且只看前一个word对后一个word做map,所以就是a->c,
: b->a. 我貌似copy的漏了最后那个->a了,不好意思。所以只要一个map就好了

l********g
发帖数: 372
22
当时没来的及问,给出来的example就是这个样子的。倒是不是主要问题吧,就是缺失
没法子一段code全完成而只要>1的数上来第一个结果一定n*1好了

【在 l*****a 的大作中提到】
: 第二题有点小疑惑
: 为什么12需要*1
: 其他的不要,
: 这样似乎没法用一段code全支持
: 似乎12只能单独处理,大家什么意见
:
: isomorphic
: remapped
: occurrences

l********g
发帖数: 372
23
对的啊,只要单向的map。

【在 Q**F 的大作中提到】
: 所以这个是单向map?a->c 不能推出 c->a.
:
: c,

c********r
发帖数: 107
24
mark
l*********u
发帖数: 19053
25
bless

isomorphic
remapped
occurrences

【在 l********g 的大作中提到】
: 报点最近的面经,都是电面中的,攒点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

1 (共1页)
进入JobHunting版参与讨论
相关主题
求Netflix面经,有些什么技术问题vm onsite 面经
twitter和Netflix的电话面经报点面经
面经netflixGOOGLE 电面面经
谁会做>??????????????????????????????????????也来攒下人品,L面经
FLAG面试总结ms onsite面经
MS sdet面经 + bloomberg电面面经zenefit 电面面经
Amazon电面面经来个面经:unfair coin問題
发几个小公司的题目一个面经
相关话题的讨论汇总
话题: formula话题: map话题: isomorphic话题: given话题: remapped