注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
首先感谢我的朋友的内推和interview 问题帮助!经历大概一个月的时间,走完了全部的流程,等答复中。
Epic technical主要2个部分:
OA 4 道题。 我遇到的是:
1. merge 2个sorted array list,final array list 不能有duplicate。
2. 把1个String里的最频繁出现的character和出现次数最少的互换。如果有次数相同的情况,取比较大(还是小。。。记不大清楚了)的值(ascii value)。
比如 abbbcc -》 baaacc
这个我不记得在不在题库里面。 但是,我用的解法是用HashMap 存每一个character出现的次数。然后再比较他们的ascii value。
3. colorful number 之前有人post 过。(要注意处理负数情况)
A number can be broken into different sub-sequence parts. Suppose a number 3245 can be
broken into parts like 3 2 4 5 32 24 45 324 245. And this number is a colorful number, since
product of every digit of a sub-sequence are different. That is,3 2 4 5 (3*2)=6 (2*4)=8
(4*5)=20 (3*2*4)= 24 (2*4*5)= 40. But 326 is not a colorful number as it generates 3 2 6
(3*2)=6 (2*6)=12. You have to write a function that tells if the given number is a colorful
number or not.
4. longest snake sequence (也是题库里的)
You are given a grid of numbers. A snake sequence is made up of adjacent numbers such
that for each number, the number on the right or the number below it is +1 or -1 its value.
For example,
1 3 2 6 8
-9 7 1 -1 2
1 5 0 1 9
In this grid, (3, 2, 1, 0, 1) is a snake sequence. Given a grid, find the longest snake
sequences and their lengths (so there can be multiple snake sequences with the maximum
length).
然后就是onsite 了。总体过程还是非常relaxing的,最有难度的就是个case study。其他还好。
就问了我一个case。
我遇到的是 怎么identify 一个病人。
答:first last+boa。如果result set 中还有多过一个,就用上contact info 比如zip code 和 phone number
然后给他画一个大概db的样子。
又问我ui 一个怎么design。我画了一下。
他又说如果病人信息输入不对找不到怎么办。
我说可以找most relevent的 base on field match。比如zip code 或者phone #,然后排列
他有说各种各样的输入错误的情况:比如明早拼错 kaly kaylee 什么的
我就告诉他可以找东西base on pronunciation,比如google 里面输入错的时候会问你你要找的其实是不是这个
然后他就问我design 一下整个algorithm。
一开始答的不大对,但是他了我一定hint之后。意识到要给每个field weight。
比如name 的weight 是5,boa 是5,gender 是10,zip code 是2,phone number 是3
甚至pronunciation 错误的情况下能给name 这个field 一定的分数。
最后把所有的分数加起来排列。
算过了。然后随便聊聊,叫我向他提问一些其他问题。
真滴relax,我因为太迟睡反第2天困的一匹而忘记了想问hr的问题。。。。。。
--------------------------------------------------------------------------------------------------------------------
基本就这样了 随便hide 点东西 [/hide]
|