【面经】EPIC

来源:互联网 发布:淘宝立即购买灰色 编辑:程序博客网 时间:2024/04/24 07:38

为了准备我的phone interview, 顺便整理在这里!

转载来自一个同系的同学


1. why Epic?
2. Why software development engineer?. 涓€浜�-涓夊垎-鍦帮紝鐙鍙戝竷
3. 介绍一个你最想说的project?
4. 有N个病人,他们各自有自己的不同症状,问你如何找出两种症状最相近的病人。小弟这次面试是一位三哥面的,从声音上听他很疲惫,而且说话声音很轻。然后不得不吐槽一下他的口语实在是太难懂了。好在之前看了一下面筋。我说这题很想是data mining的题目,但是我给出的是用hashmap的解法, 具体的方法大家可以去career cup 上看看。. from: 1point3acres.com/bbs 
然后小哥就给我介绍了一下公司的情况云云,说实话之前有听说过他家不少情况,也就没有认真听了。
问完几个问题后电面就草草了事了。

然后是OA:
有四种类型的题目,可以按顺序任意选,我就按照自己做的顺序写下来了:
1. MATH,很多人说是GRE难度,其实我对GRE没什么印象了。 反正读懂题目之后对来自中国的战友们应该没什么难度。
2. 新语言学习, MIIS, 这个不用提前准备,现学现用,只要看懂了介绍,题目还是比较简单的。基本上是逻辑和数学运算
3. speed 题目,最后两题没有时间看了,基本上属于看一眼就要做的那种,没什么时间想。. visit 1point3acres.com for more.
4. programming: 四道题都不是很困难,只能说运气比较好. 1point3acres.com/bbs
(1) spiral order:
If an N X N matrix is given, print it in spiral order. 
Example: Below is 5 X 5 matrix 

i l o v e . more info on 1point3acres.com
d i n t e 
n i e e p .1point3acres缃�
a v w r i 
m a x e c .鏈枃鍘熷垱鑷�1point3acres璁哄潧

Print in spiral order. Output is iloveepicexamandinterview
(2) Long substraction: 
substraction between two arrays. E.g. [2,2,2,2,2] - [1,1,1] = [2,2,1,1,1]
(3) Generate all well-ordered numbers given n digits. 
(4) additive number :
Additive numbers are defined to be a positive integer whose digits form an additive sequence. E.g. 11235 (1+1=2, 1+2=3, 2+3=5). What makes it difficult is that 12,122,436 is also one (12+12=24, 12+24=36). Given a range of integers, find all the additive numbers in that range. . Fro




本帖最后由 Sophia 于 2-1-2015 10:42 PM 编辑

背景:
土木转行半年多一点,master在读,刷题和算法还有编程量都不足,所以很多时候解题都很暴力。比如这次很多String操作我都忘记StringBuffer有哪些方法,所以直接用String,这个在google和facebook那种地方肯定要被挂。

2分钟速度题:
大部分都很简单,记忆里稍微多花了几秒的,
重排几个单词然后判断正确与否:wood for Sand fuel used is,这个当时就不太懂是什么鬼
1个钟12天慢了2小时24分钟,请问一天慢多少,等差数列,2分钟。

数学题:
//////////////////////////////////////////////////////////////////
Math Questions
1.       3 24-168 1008 -5040, what’s the next number? (20160)
2.       Amagic tree, double the height every day, the tree is 80 on 10th day,on which day the tree is 20 height? (8th day)
3.       Twosoftware developers coming out from No. 1 office and No. 106 office with theconstant speed. The developer in No.1 office crosses 5 offices per min, theother one passes 10 offices per min. In which number of office they will meetwith each other? (36)
4.       Twocoins worth 55 cents, one is not nickel (5 cents), what are the values of twocoins? (5 & 50)
5.       Fillin the blank, 4 7 13 __ 49 97 (25)
6.       One goatclimbs the cliff, the cliff is 60.5 inches height, the goat climbs 3 inch permin then falls 2 inches. How many times that goat could get to the top? (59)
7.       Thecompany has 50,000 check, and 500 cash. They use cash to buy 150 stamps whicheach of them is 44 cents. They also bought 2 computers, each of them is 2025dollars. 1/15 of the computer expenses was paid by cash, and 1/10 is paid bycash. After that, they use check paid four employees’ weekly payment, theannual income of each employee is 26,000 dollars and there are 52 weeks peryear. What’s the value of cash and check? (cash:164, check:47595)
8.       Apple= 40 cents, banana = 60 cents, grapefruit = 80 cents, what’s the value of pear?(40)
9.       Ifone and half teenagers eat one and a half pizzas in one and a half days, howmany pizzas can 9 teenagers eat in 3 days? (18)
10.     A man goes to a hardware shop and asks forprice of an item. The shop keeper replies that the iteam is one for $1. The mangives the shop keeper $3 for 600. What did the man buy for his newly paintedhouse? (House number)
11.     You have three kinds of magazines, all buttwo are Times, all but two are Science, all but two are Nature. How manymagazines in total do you have? (3)
12.     You are working on an exam and the questionis smudged and you can’t see the question. Based on the answers only, what isthe answer? (E). 鍥磋鎴戜滑@1point 3 acres
A) All of the below 
B) None of the below .
C)Some of the above . From 1point 3acres bbs
D) One of the above 
E) None of the above
F)None of the above
13.     If a clock looses 2 seconds per day, how muchtime will it loose in 2 days ? (6sec)
14.    A manhas two cubes on his desk. Every day he arranges both cubes so that the frontfaces show the current day of the month. What numbers are on the faces of thecubes to allow this? (0,1,2,3,4,5; 0,1,2,6,7,8)
15.     You can go to a fast food restaurant to buychicken nuggets in 6-pack, 9-pack or 20-packs. Is there such a number N, suchthat for all numbers bigger than or equal to N, you can buy that number ofchicken nuggets? (44)
16.    Inhow many ways cube can be painted using three different colors (57)

//////////////////////////////////////////////////////////////////
总结得很完美了,细心就好。

MIIS题:
比较恶心的一个部分,也没啥可说的,介绍给你一门新语言和它的规则,然后问你一些这个语言的表达式的问题。
总之注意好细节,多看看前面的题目里提供的语言细节就好。
值得注意的部分是(有些可能有出入,总之多读题就好):
这个语言的operator是严格的从左到右,除非有括号。所以1+2*3=9.
!在这里是or,'是not。'用在数字上会变成0,用在字符串上会变成null。
true的值是robout,所有比特位是1,false的值是null,等于null string。
operator碰到不match的对象,会把对象按照一定规则转换成operator需要的对象。(比如"3A“ + 1就是3+1,或者1."A"是"1A")。
等号在这里也当做boolean判断符号,所以A=B=C=(1=1),除了第一个是赋值,后面都是boolean判断。(个人理解,不是很确定)。

扣锭题:(http://blog.csdn.net/lsdtc1225/article/details/39949367)
1) Additive number,12122436或者1123或者224610
我的做法是直接DP生成斐波那契数列,但是前面两个数字做个loop(1,1,2或者2,2,4或者3,3,6)。不过我用了String来做,所以不用考虑运算,直接拼进去就好。感觉面经里的写法要么太长要么简洁之余却不够正确。

2) Well ordered password,给定总长度n,生成从小到大递增的密码比如135或者289,但是不能是194这样。
就是一个递归+组合问题,每次递归把可选数字范围+1,附带一个当前的总digits和目前组合出来的数字(每次num = num * 10 + i),到n就print结果。

3) Verify Password,有一些小细节要检查,然后重点是不能出现两个相同的substring,比如123123ab或者123aa456。
我这里思路不是特别确定,一开始写了个O(N^2)的用hashset存所有substring的办法。总感觉有很多优化空间,但是想不到了。

4)Seed number,比如738的seed是123,因为123*1*2*3=738,给你一个数字,找到它的seed。
这题要注意还会让你检查用户输入的数字的validity,我做了正负检查,溢出检查还有浮点部分检查。
做到这里已经做了挺久也不想再考虑太多,检查n所有的因数。生成所有的因数大概需要消耗sqrt(n)和sqrt(n)的空间,不过也比brute force也节省很多就是了。

总结来说,coding部分的确很多高频题,大家多看看上面的面经总结覆盖率很高很高,而且就算想不到漂亮的算法用brute force然后改良下也是ok的。他们家是伪代码都能进onsite,所以如果对代码整洁度和bug-free不是很有把握,不如写伪代码了。

希望能拿到onsite,去他们家总部campus玩玩顺便感谢内推我的基友吧。




本帖最后由 Sophia 于 3-13-2015 11:45 PM 编辑

2015暑假Intern,因为其他几个在等的公司逼格高很多,估计要拒。(虽然他们家今年base已经到11万了,而且各种有钱。。。)
土木转行所以细节可能粗糙,请谅解。

感想:
1,有钱,财大气粗,住的宾馆餐饮全包,这辈子第一次吃单餐超过200刀(不点对的只点贵的)居然是在这里。。。一定别客气,点!
2,有钱,财大气粗,每个building都是各种内部华丽装修和个性化,还在盖新building为了让每个员工有自己的office,整个campus得自备交通工具。
3,有钱,财大气粗,出了机场直接cab,司机都知道怎么打账单给epic了,晚上host带去吃饭的餐厅报上epic的名字也直接免单。
4,好吧,其实没啥技术问题,能过OA(请参考其他帖子),基本你就是去culture fit的了,技术基本不会问,放轻松去就好,至少算是旅游吧。

Onsite:(全是45分钟一轮)

一:
和其他面试者一起,(洗脑)Epic的好和Madison当地的吃住行如何方便(你逗我),一轮。然后第二轮,会有几个工程师来聊他们的工作感受和回答一些general的问题。注意利用好这两轮收集公司的不同产品和技术细节的信息(比如他们家的主要产品是医生用的一套,护士用的一套,病人用的一套,然后核心的数据库是统一的,提供接口给不同的软件使用,有很多细节可以问)。

二:
谈项目经验,要能谈到非常详细,45分钟里30分钟让你自己说项目的各种细节,选一个你了解最深刻的项目谈。
不需要担心项目和他们家技术的fit度(VB,MIIS,C#,想fit也很难。。。),只要能表现你对一个项目的了解和掌握就好。
可能会问些数据库的问题,因为他们家的MIIS的确是挺早的key value pair数据库,可以稍微做些功课,能和他们聊起来就很加分。
上面收集到的信息,这里想办法和面试官的谈话内容联系起来,会很加分。

三:
设计题,设计一个可以给医院前台查询一个访客的数据库记录的前台系统。
要设计各种条件来过滤,保证这个条件过滤有效而且尽量能够满足现实情况(比如访客可能携带的信息很少,比如访客可能是被送来急救的所以无法交流),条件要尽可能unique(比如名字就比生日更unique这样)。
设计一个输出结果的形式,让使用者可以最快找到match,这里要考虑输出结果的排列方式。因为信息类型很多,不能全部打印在一个表里,要把列分开来,列与列之间的优先度如何匹配,是否能设计优先度算法,是否可以根据用户的反馈改良等等。

四:
和其他面试者一起吃午饭,吹牛打屁,他们家的Gelato真好吃,他们家的鸡汤也不错。
越来越感觉像大学校园而不是公司。

五:
最后,HR面,为啥EPIC,怎么知道的,你对工作的expectation。
听说这里有不少人会挂,就是把自己描述得太ambitious了。他们家得的扩张可以说很ambitious,但是技术方面相当保守,而且公司文化也不是特别希望你天天挂念着自己的ambition,把东西老老实实做好就行。所以如果真心想去的,这里别太ambition,看看glassdoor上的外国人都怎么回答HR问题的吧。

(六,PS):
如果公司安排不是面试前checkout宾馆的话,爽了,再去宾馆点几发大餐然后出来瞎逛吧(其实逛一遍就够了。。。)
数学题目总结:

做完OA,回馈地里发一下OA总结的题目。Math Questions

1.       3 24-168 1008 -5040, what’s the next number? (20160)
2.       Amagic tree, double the height every day, the tree is 80 on 10th day,on which day the tree is 20 height? (8th day)
3.       Twosoftware developers coming out from No. 1 office and No. 106 office with theconstant speed. The developer in No.1 office crosses 5 offices per min, theother one passes 10 offices per min. In which number of office they will meetwith each other? (36)
4.       Twocoins worth 55 cents, one is not nickel (5 cents), what are the values of twocoins? (5 & 50)
5.       Fillin the blank, 4 7 13 __ 49 97 (25)
6.       One goatclimbs the cliff, the cliff is 60.5 inches height, the goat climbs 3 inch permin then falls 2 inches. How many times that goat could get to the top? (59)
7.       Thecompany has 50,000 check, and 500 cash. They use cash to buy 150 stamps whicheach of them is 44 cents. They also bought 2 computers, each of them is 2025dollars. 1/15 of the computer expenses was paid by cash, and 1/10 is paid bycash. After that, they use check paid four employees’ weekly payment, theannual income of each employee is 26,000 dollars and there are 52 weeks peryear. What’s the value of cash and check? (cash:164, check:47595)
8.       Apple= 40 cents, banana = 60 cents, grapefruit = 80 cents, what’s the value of pear?(40)
9.       Ifone and half teenagers eat one and a half pizzas in one and a half days, howmany pizzas can 9 teenagers eat in 3 days? (18)
10.     A man goes to a hardware shop and asks forprice of an item. The shop keeper replies that the iteam is one for $1. The mangives the shop keeper $3 for 600. What did the man buy for his newly paintedhouse? (House number)
11.     You have three kinds of magazines, all buttwo are Times, all but two are Science, all but two are Nature. How manymagazines in total do you have? (3)
12.     You are working on an exam and the questionis smudged and you can’t see the question. Based on the answers only, what isthe answer? (E)
A) All of the below . 1point 3acres 璁哄潧
B) None of the below .
C)Some of the above 
D) One of the above 
E) None of the above
F)None of the above
13.     If a clock looses 2 seconds per day, how muchtime will it loose in 2 days ? (6sec)
14.    A manhas two cubes on his desk. Every day he arranges both cubes so that the frontfaces show the current day of the month. What numbers are on the faces of thecubes to allow this? (0,1,2,3,4,5; 0,1,2,6,7,8)
15.     You can go to a fast food restaurant to buychicken nuggets in 6-pack, 9-pack or 20-packs. Is there such a number N, suchthat for all numbers bigger than or equal to N, you can buy that number ofchicken nuggets? (44)
16.    Inhow many ways cube can be painted using three different colors (57)
Coding Questions
1.       Colorful Number:
A numbercan be broken into different sub-sequence parts. Suppose a number 3245 can bebroken into parts like 3 2 4 5 32 24 45 324 245. And this number is a colorfulnumber, 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 acolorful number as it generates 3 2 6 (3*2)=6 (2*6)=12. You have to writea function that tells if the given number is a colorful number or not.
2.       Well-ordered String:
You knowa password is well-ordered string. Well-ordered string means that the order ofthe characters is in an alphabetical increasing order. Like “abEm” is awell-ordered number. However, “abmE” is not a well-order number. Given an input# that tells you also how many digits are in the password, print all possiblepasswords.
3.       Desirable Number
A number is called 'desirable' if all thedigits are strictly ascending eg: 159 as 1<5<9. You know that your rivalhas a strictly numeric password that is 'desirable'. Your close ally has givenyou the number of digits (N) in your rival's password. WAP th\hjtat takes in'N' as input and prints out all possible 'desirable' numbers that can be formedwith N digits.
4.       Telephone Number         
Print all valid phone numbers of length nsubject to following constraints:
If a number contains a 4, it should startwith 4
No two consecutive digits can be same
Three digits (e.g. 7,2,9) will be entirelydisallowed, take as input
5.       SMS
You are given a telephone keyboard
0-0, 1-1, 2-ABC2, 3-DEF3, 4-GHI4, 5-JKL5, 6-MNO6,7-PQRS7, 8-TUV8, 9-WXYZ9, *-space, #-char separater
if you type "2", you will get 'A', that is "2"-'A', "22"-'B' ,"222"-'C', "2222"-'D'
However, the digits can repeated many times
"22222"-you get 'A' again 
You can use "#" to separate characters, for example
"2#22", you get "AB"-google 1point3acres
However, you may also have consecutive different digits without separator:"23"-'AD'. 涓€浜�-涓夊垎-鍦帮紝鐙鍙戝竷
If you type "*", it means space.
You a given a sequence of digits, translate it into a text message
6.       Keypad Permutation
Phone has letters on the number keys. forexample, number 2 has ABC on it, number 3 has DEF, 4 number has GHI,... , andnumber 9 has WXYZ. Write a program that will print out all of the possiblecombination of those letters depending on the input.  
7.      Thestepping number: 
A number is called as a stepping number if the adjacent digits are having adifference of 1. For eg. 8,343,545 are stepping numbers. While 890, 098 arenot. The difference between a ‘9’ and ‘0’ should not be considered as1. Given start number(s) and an end number (e) your function should listout all the stepping numbers in the range including both the numbers s & e.
8.       Two Primes
Goldbach's conjecture : Every even integergreater than 2 can be expressed as the sum of two primes. Write a functionwhich takes a number as input, verify if is an even number greater than 2 andalso print at least one pair of prime numbers.
9.       FindingWords
Write a program for a word search. If thereis an NxN grid with one letter in each cell. Let the user enter a word and theletters of the word are said to be found in the grid either the letters matchvertically, horizontally or diagonally in the grid. If the word is found, printthe coordinates of the letters as output.
10.    Spiral Matrix
Given aNXN matrix, starting from the upper right corner of the matrix start printingvalues in a counter-clockwise fashion. 
E.g.: Consider N = 4 
Matrix= {a, b, c, d, 
        e, f, g, h, 
        i, j, k, l, 
        m, n, o, p} 
Your function should output: dcbaeimnoplhgfjk
11.    Largest Sum Sub Array
Find thelargest sum contiguous sub array. The length of the returned sub array must beat least of length 2.
12.    Advisered Average Number
Write aprogram to display the advisered average for the list of numbers my omittingthe three largest number in the series.
E.g:3,6,12,55,289,600,534,900,172.  avg=(3+6+12+55+289+172) /6and eliminating534,900,600
13.    Count And Say
First,let user input a number, say 1. Then, the function will generate the next 10numbers which satisfy this condition: 
1, 11,21,1211,111221,312211... 
explanation: first number 1, second number is one 1, so 11. Third number is two1(previous number), so 21. next number one 2 one 1, so 1211 and so on...
14.    Valid Password
In 1-9 keypad one key is not working. If someone enters a password then not working key will not be entered. You have givenexpected password and entered password. Check that entered password is valid ornot. Ex: entered 164, expected 18684 (you need to take care as when u enter18684 and 164 only both will be taken as 164 input)
15.     Verify Password
Verify if the given password is valid/invalid
1. must be 5-12 characters long . 1point 3acres 璁哄潧
2. must contain at least one number and one lowercase character 
3. a sequence must not be followed by the same sequence (like 123123qs isinvalid, 123qs123 is valid)
16.     Snake Sequence
You are given a grid of numbers. A snakesequence is made up of adjacent numbers such that for each number, the numberon the right or the number below it is +1 or -1 its value. For example, . visit 1point3acres.com for more.
1 3 2 6 8 
-9 7 1 -1 2 
1 5 0 1 9 . 1point3acres.com/bbs
In this grid, (3, 2, 1, 0, 1) is a snake sequence. Given a grid, find thelongest snake sequences and their lengths (so there can be multiple snakesequences with the maximum length).
17.     Mountain Point
Given a M * N matrix, if the element in thematrix is larger than other 8 elements who stay around it, then named thatelement be mountain point. Print all the mountain points.
18.     Additive Number
Anadditive sequence is 1,2,3,5,8,13 where T(n) = T(n -1) + T(n - 2). A numberrange is given to you. Find the additive sequence number in that range.
Given the start and an ending integer as userinput, generate all integers with the following property.
19.     Fibbonaci Number
There is one kind of numbers call FibbonaciNumber, which satisfy the following situation:
A. can be spilt into several numbers;
B. The first two number are the same, thenext number is equal to the sum of previous two
eg. 112 (2 = 1 + 1), 12,122,436(12 + 12 = 24,12 + 24 = 36)
If you are given a range by the user, findall numbers that are Fibbonaci numbers.
20.     Coin Change
Somethingcost $10.25 and the customer pays with a $20 bill, the program will print outthe most efficient "change-breakdown" which is 1 five, 4 ones, and 3quarters. Find the minimum number of coins required to make change for a givensum (given unlimited cumber of N different denominations coin)
21.     Separate the number
Print the sequences from the input given bythe user separated by semicolon 
e.g.: 4678912356012356 
output: 4;6789;123;56;0123;56;
22.     Find Max/Min Number
Take a series of integers as input till azero is entered. Among these given integers, find the maximum of the oddnumbers and the minimum of the even integers (not including zero) and printthem.
23.     Swapping String
Given two strings, you need to transpose thefirst string to the second string by means of only swaps between 2 consecutivecharacters in the first string. This must be performed by doing a series ofthese swaps in order to get the second string.
24.     Mingo
A random generator (like a speakerstanding in a group housie game calls out a number) generates out any numberfrom 1 to 1000. There is a 10X10 matrix. A random generator assigns valuesto each block of this matrix(within 1 to 1000 obviously). 
Whenever, a row or a column or a diagonal is fully filled in this 10x10 fromthe numbers called out by the speaker, its called a 'Mingo'. Write aprogram that will find first Mingo, then second Mingo, then thirds Mingo...andso forth.
25.     Matrix Position
Given an NxN matrix with unique integers :Find and print positions of all numbers such that it is the biggest in its row andalso the smallest in its column . e.g. : In 3 x 3 with elements . Waral 鍗氬鏈夋洿澶氭枃绔�,
1 2 3 
4 5 6 
7 8 9 
the number is 3 and position (1,3)
26.     Replace String
Froma given string, replace all instances of 'a' with 'one' and 'A' with 'ONE'.
Example Input: " A boy is playing in a garden"
Example Output: " ONE boy is playing in onegarden"
-- Not that 'A' and 'a' are to be replaced only when theyare single characters, not as part of another word.
27.     Replace Words
Given a string. Replace the words whose length>=4and is even, with a space between the two equal halves of the word. Consideronly alphabets for finding the evenness of the word 
I/P "A person can't walk in this street" . 鐣欏鐢宠璁哄潧-涓€浜╀笁鍒嗗湴
O/P "A per son ca n't wa lk in th is str eet"
28.     Replace AEIOU
Replace a,e,i,o,u with A,E,I,O,U.
At most four eligible letters from the rearof the string are replaced.
The first three eligible letters in thestring are always exempted from replacement.
29.     Security Keypad
There is a security keypad at the entrance ofa building. It has 9 numbers 1 - 9 in a 3x3 matrix format. . Waral 鍗氬鏈夋洿澶氭枃绔�,
1 2 3 
4 5 6 
7 8 9 
The security has decided to allow one digit error for a person but that digitshould be horizontal or vertical. Example: for 5 the user is allowed to enter2, 4, 6, 8 or for 4 the user is allowed to enter 1, 5, 7. IF the security codeto enter is 1478 and if the user enters 1178 he should be allowed. Write afunction to take security code from the user and print out if he should beallowed or not.
30.     Calendar
Get a date (mon/day/year) from user. Printexact the week of dates (Sun to Sat). ex) input: 2/20/2001 if the day isWednesday 
output: Sunday 2/17/2001 
Monday 2/18/2001 
Tuesday 2/19/2001 
Wednesday 2/20/2001 .鐣欏璁哄潧-涓€浜�-涓夊垎鍦�
Thursday 2/21/2001 
Friday 2/22/2001 
Saturday 2/23/2002
31.     Seeds Number
Find the seed of a number. 
Eg : 1716 = 143*1*4*3 =1716 so 143 is the seed of 1716. find all possible seedfor a given number.
32.     Tic Tac Toe
N*N matrix is given with input red or black.You can move horizontally, vertically or diagonally. If 3 consecutive samecolor found, that color will get 1 point. So if 4 red are vertically then pointis 2. Find the winner.
33.    Fill a “magic square”matrix.
A magic square of order n is an arrangement of thenumbers from 1 to n^2 in an n by n matrix with each number occurring exactlyonce so that each row, each column and each main diagonal has the same sum. Then should be an odd number. In the middle cell of the top row, fill number 1.Then go to above row and right column, and fill following number 2. If it’s outof boundary, go to the opposite row or column. If the next cell is alreadyoccupied, go to the cell below this cell and fill following number. An exampleof 5*5 grid is like this for the first 9 numbers:
0 0 1 8 0
0 5 7 0 0
4 6 0 0 0
0 0 0 0 3
0 0 0 2 9
34.     Bull and Cows Game
There’s a word guessing game. One personthink a word, and the other one guess a word, both words have the same length.The person should return the number of bulls and cows for the guessing. Bullsrepresent the number of same characters in the same spots, whereas cowsrepresent the number of characters guessed right but in the wrong spots. Writea program with two input strings, return the number of bulls and cows.
35.     Palindromes
Print all palindromes of size greater than orequal to 3 of a given string. (How to do it with DP)?
36.     Unique Number
Write, efficient code for extracting uniqueelements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9)-> (1, 3, 5, 9).
37.     Subtraction of two Arrays
Suppose you want to do the subtraction of twonumbers. Each digit of the numbers is divided and put in an array. Like A=[1,2, 3, 4, 5], B=[4, 5, 3, 5]. You should output an array C=[7, 8, 1, 0].Remember that your machine can’t hand numbers larger than 20.
38.     Basketball Hit Rate
The hit rate of the basketball game is givenby the number of hits divided by the number of chances. For example, youhave 73 chances but hit 15 times, then your hit rate is 15/73=0.205 (keep the last3 digits). On average, you have 4.5 chances in each basketball game. Assume thetotal number of games is 162. Write a function for a basketball player. Hewill input the number 
of hits he has made, the number of chances he had, and the number of remaininggames. The function should return the number of future hits, so that hecan refresh his hit rate to 0.45
39.     Clock Angle
We are given a specific time(like 02:23), weneed to get the angle between hour and minute(less than 180)
40.    Jump Chess
There’sa N*N board, two players join the jump game. The chess could go vertically andhorizontally. If the adjacent chess is opponent player’s and the spot besidethat is empty, then the chess could jump to that spot. One chess could not beenjumped twice. Given the position of the spot on the board, write the program tocount the longest length that chess could go.
41.    Decimal Number
Let the user enter a decimal number. Therange allowed is 0.0001 to 0.9999. Only four decimal places are allowed. Theoutput should be an irreducible fraction. E.g.: If the user enters 0.35,the irreducible fraction will be 7/20.
42.    Continuous Alphabets
Printcontinuous alphabets from a sequence of arbitrary alphabets 
For example: 
Input: abcdefljdflsjflmnopflsjflasjftuvwxyz .1point3acres缃�
Output: abcdef; mnop; tuvwxyz
Input: AbcDefljdflsjflmnopflsjflasjftuvWxYz .鐣欏璁哄潧-涓€浜�-涓夊垎鍦�
Output: abcdef; mnop; tuvwxyz
43.    Substring Addition
Write a program to add the substring. eg :say you have alist {1 7 6 3 5 8 9 } and user is entering a sum 16. Output should display(2-4) that is {7 6 3} cause 7+6+3=16.
44.     Balanced String
Given a string that has{},[],() and characters.Check if the string is balanced. E.g. {a[(b)]} is balanced. {a[(b])} isunbalanced.
45.    RGBCompare
Given a string of RGB value (rr, gg, bb)which represents in hexadecimal. Compare if rr or gg or bb is the biggest, ortwo of those values are equal and larger than the third one, or three valuesare equal with each other.
46.     Edge Detection
Two-dimensional array representation of animage can also be represented by a one-dimensional array of W*H size, where Wrepresent row and H represent column size and each cell represent pixel valueof that image. You are also given a threshold X. For edge detection, you haveto compute difference of a pixel value with each of it's adjacent pixel andfind maximum of all differences. And finally compare if that maximum differenceis greater than threshold X. if so, then that pixel is a edge pixel and have todisplay it.
47.     Plus Equal Number
Given a number find whether the digits in thenumber can be used to form an equation with + and '='. That is if the number is123, we can have a equation of 1+2=3. But even the number 17512 also forms theequation 12+5=17.
48.     Octal and Decimal Palindrome

The decimal and octal values of some numbersare both palindromes sometimes. Find such numbers within a given range.


这次EPIC 的OA旷日持久,做了4 个小时。 鏉ユ簮涓€浜�.涓夊垎鍦拌鍧�. 
我依次做的是数学,快速,MIIS,编程。
1. 数学,特别像GRE的题,有一道题半天没读懂,说的是, 半小时前三点以后的时间    是  从那里到五点前的四倍。 读了好久才明白。

2. 快速题没做完,挑题短的,手头计算器一定要打的溜。

3. MIIS 读懂了都很容易,集中在算数运算和逻辑运算。 

4. 编程题是, 
  a. 给出RGB 的 hex string, 求色系。(红的, 黄的,还是灰 的等等), 注意要自己转化string 到 hex , 不能用函数。. 涓€浜�-涓夊垎-鍦帮紝鐙鍙戝竷
  b. Tic Tac Toe
  c. 求 max sum of subarray
  d. well ordered password. 给出长度,就升序序列, 如 长度是3, 列出 123,124,125, ... 689 ....


海投,epic一周多前给了电面。常规behavior,why epic,why software engineer,which language you like most,题目就一个,设计sudukou游戏,答了以后follow up你这个游戏能不能保证唯一解,没答出来...他笑了笑说没事...面完google了一下貌似保证唯一解确实不容易,尤其是游戏难度增加以后,能不能保证唯一解就成了个数学问题了好像...anyway,给OA了

OA,考前三天把career cup总结的五十来道题刷完了,果然,coding部分面经全中. 鍥磋鎴戜滑@1point 3 acres
四道题:(都可以在careercup搜到,我就不把题目描述那么详细)
1. 类似哥德巴赫猜想的1+1=2
2. 计算时针,分针夹角的那道. 1point3acres.com/bbs
3. 给长度,permutate all well-ordered password,145 -> 1<4<5
4. 经典中的经典,additive number

0 0
原创粉丝点击