Showing posts with label LinkedIn. Show all posts
Showing posts with label LinkedIn. Show all posts

【转载 From MITBBS】FLGU面经offer及杂谈

上点新鲜面经回馈版面

F家phone
中年亚裔,比较注重细节
3sum, 每个元素可用多次
ksum, 讨论了下理论最优解法和复杂度,面试官说空间复杂度太大而且不好code,就用
简单方法写了个recursive的

约onsite时recruiter说entry level招满了,要把onsite推到10月,只能放弃了

L家

phone

两个老美都挺nice 一个主面一个shadow
第一题lowest common ancestor in binary tree with parent pointer
第二题find minimum distance between two words in a string array
e.g (“the”, “quick”, “brown”, “fox”, “quick”)
distance(“fox”,”the”) = 3
distance(“quick”, “fox”) = 1

onsite

1.host manager面,国人大叔,主要是些背景和behavior question

2.technical communication,亚裔小哥,讲自己的project 
这里一点个人的经验是如果面试官不熟悉你的领域的话不一定要讲自己亲手做的东西,
但一定要懂细节(因为不是每个人都有拿得出手又适合展示的project),我就是讲自
己组产品的框架。重点是不要让面试官觉得你做的东西很简单没挑战性,但是也不能太
晦涩要让他能听懂。所以最好先讲大的框架不要抠细节,他如果对那个具体细节感兴趣
自己会问,然后你再和他讨论效果会比较好。最好从他感兴趣的某个点上展开体现下你
的知识深度。另外如果面试官问哪块是你做的可以适当吹牛。

3.lunch interview
陪同你吃饭的人要提供feedback所以开始以为会吃得很不自在,结果碰到超nice的国人
大哥,直接和我中文聊让我放松,最后一路聊天加饭后散步水过,非常感谢!

4. system design,两位国女面试官,经典题url shortener。
开始上网上看过的一个做法,直接被shadow面试官全盘否定。主面试官大姐人很好帮我
打圆场,重新开始设计。这里一点个人经验是有些面试官喜欢否定面试者,这样的人往
往不是大牛但自傲,这种时候哪怕你知道自己是对的也千万不要与之硬扛,否则必死无
疑。最好顺着他来拍个马屁什么的,还有一线生机。

5. coding interview one,面试官是酷酷的国人小哥和新来的印度小哥。
warm up 如果两个linked list intersect的话如何找到merge point。 
follow up 有环的情况 
假设给一排n个房子paint,有m种不同颜色可选,相邻房子不能同色,给定一个mxn的
cost matrix,求最小cost的染色方法。

6. coding interview two,白人小哥。
algorithm game,两个玩家从一组数里轮流取数,取过就从数组拿走,如果某个玩家取
数后所有已经取出的数和超过给定值则胜出,要求判断第一个拿是否能赢写函数
boolean isWin(Set<Integer> choosable,target)
判断一个数组里是否存在三个数可以组成一个三角形 
lc原题all permutation of array,array 可以有重复元素,结果不允许重复

G家

内部哥们强推,跳过phone

onsite
1. card shuffler:shuffle的程序是一个简单的array,array里的值代表当前位置卡
片的下一个位置 
e.g 当前卡片位置ABCDE shuffle array是01234的话下个卡片位置还是ABCDE,43210的
话下个卡片位置是EDCBA。
问给定一个shuffle array,不断用这个array去shuffle,能否得到最初的card deck,
能得话要多少次。 
吐槽下,面试官是个三哥,全程非常严肃/黑脸,我说句话就用小本子记下搞得我很紧
张。我说用java写可以吗,曰可以,刚写了两行问我add是啥意思,不知道是想考我基
础知识还是不懂java。

2. 给定一个binary search tree,返回range内所有key,key可以有重复。 
版上出现了多次的把一个数拆成任意个平方和的最小拆法。
面试官是中年国人大叔,除了告诉我题目是啥就在电脑上自顾自工作,问话要问两遍才
有反应。写完说我程序有问题,查了半天查不出bug,然后指出我漏了个尖括号,跪了
。。

3. 版上出现多次的longest consecutive sequence in tree 
follow up 如何加速,memory放不下怎么办。
国人小哥比较nice,但是只要我不和他主动说话绝不主动和我说话,因为前两场心情略
糟糕写完题目在白板前发呆,哥们就望着我啥也不说,尴尬。。当然也不怪他我自己比
较紧张,回家发现有很弱智的bug但小哥没提不知道怎么回事,可能放我水了

4. 设计个用bit形式表示时间(小时:分钟)的clock,
e.g 10:15可以写作1010:1111,每个bit是一个小灯泡,打印所有有且仅有n盏灯亮着的
时间,
e.g. n=0就只有0:0一种可能。

面试官是亚裔年轻mm,话不多人很cool,但是思路清晰会引导面试者,感觉碰到懂得引
导面试者或冷漠面试官对面试人表现会有很大影响,真的是看运气了。

5.算法游戏,给一个只有+-两种字符的array,两个玩家,轮到某个玩家他可以任选
两个连续的--将他们变成++,如果某个玩家发现自己无法行动则赢得游戏,要求写
isWin(String s)判断先行动的玩家能否赢。
followup 如何优化,时间上和空间上。
面试官是做android前端的白人mm,非常活泼健谈,一路聊天愉快,面完就感觉她会给
强推。

之前发过了U的店面,最后签了offer,就不发onsite面筋了。

背景:phd1年多经验,非互联网养老公司
工作c/c++为主做软件性能优化比较多,为了面试专门去coursera上了java(之前有人
推荐的Princeton的算法课)和python的课,感觉多会几种语言后对水平帮助很大,准
备过程中有什么不懂就stackoverflow,
也很有帮助。之前没有任何互联网经验,唯一经验就是自己在aws上做一个小blog网站
,aws构架是scalability的经典教科书,值得学习一下

干货结束,之后是对各个公司和offer的看法,有很多主观因素,不喜勿喷。

G家
很多人觉得g家面试官总体素质很高,不过个人最近面试中的不愉快经历基本都是在g家
发生的,没有明显觉得g家面试官比别家水平高,可能是我运气不好或第一个面的太紧
张。

g家offer流程不确定性很大,快的一周内搞定,慢的要一个月也不稀奇(我自己亲身经
历没有team match还用了快一个月,中间recruiter换过一次,第一个面的g但别家
offer deadline都过了才出结果)。所以最好把g排在最早面试,但是坏处是拿g热身风
险太大,面专门的热身公司对骑驴找马的同学cost又比较高。

个人对g的看法比较neutral,觉得5年之内还是稳稳的业界老大,但是增长已经放缓,
暂时看不到第二春的迹象。坏处就是有明显的刷简历和养老公司的趋势,碰到许多ex-
googler对自由度低和没有存在感颇有微词。很多人升T5不久就走了。

g家默认发low ball offer,但是如果你有好的competing offer可以给的range比任何
一家都大,就看想不想抢你了。从我自己搜集的资料来看,T4的range大概是(括号我
自己的number做参考)
base : 130-140K (130)
GSU:300-800  (670)
signon:0-50K    (50)
基本原则就是没好的competing offer往下限看齐,否则往上限看齐,当然可以更多,
但那基本是极少数牛人,不在讨论范围内。base是HC定的,negotiate空间很小,GSU和
signon有很大空间,senior的recruiter给个几万signon完全可以自己决定。所以有
competing尽管开口要不会有问题。

g家刷题还是有些用处的,但不是决定性的。对非大牛来说g offer运气成分很大,g家
的挑人原则和别人不一样,有strong hire很重要,有个把not hire不影响大局,总体
是1 strong hire + 1 not hire 》1 hire + 1 hire。如果一个strong没有哪怕全是
hire也可能过不了HC。从我自己的base可以推断feedback平均分很一般,但有人力挺我
才拿到的offer,因为recruiter专门和我提到impress some interviewer,并且自己感
觉很有可能有一个面试官给了我not hire。

L家
个人对L家印象不错,recruiter很热情,感觉对面试人比狗家上心,面完后两天就告诉
过了HC可以有offer,专门找了hm和director和我约谈,感觉都不错,最后据offer的时
候很不好意思。

L家是我面过所有里面coding比重较小的,它家题库不大,career cup和论坛上把他家
题都刷熟再加leetcode过coding面一点问题都没有。L家的重头戏在design和
communication,一定要好好准备,我有认识acm大牛没拿到L offer估计就是栽在这些
上面。

L家感觉作为第一份工作非常好:entry level package高,不low ball;app track很
多职位做的事情类似full stack engineer,从mobile到后端都管,是学习的好机会;
总体氛围不错,worklife balance好。缺点是:senior拿的/refresh不如g; 烙印hm
多,干活的都是老中;在普通人群中牌子不如g硬。当然每个人感受不同,其中很多缺
点也算不上缺点。个人聊过的烙印hm感觉人还不错。最后拿的包裹:
base: 145K
RSU: 300K
signon: 50K

U家
对U家最深刻的印象是里面每个人都对公司有超乎寻常的热情。后来才知道对他家没热
情的面试就被刷了。他家很看重这个,如果有人面试中觉得你对他们公司没信心,基本
是一票否决。U家大概是近几十年争议最大的公司了,如果你去网上看新闻评论,各种
负面报道和谩骂基本是铺天盖地,看不见什么好评论,光看这些感觉这个公司分分钟要
倒闭的样子,但事实是它的business还在以惊人的速度增长,鲜明对比下的问题值得深
思。网上有很大的一部分负面评论和customer service有关,它家只有邮件没有电话客
服让很多人很抓狂,另外负面宣传让很多没怎么用过uber的民众觉得它就是个黑车公司
,根本不知道它后面的mission。还有一个很有意思的是我生活中认识的用过uber的人
基本都说好,没见过一个说不好的,但网上骂的那么多真的让人怀疑是不是出租车司机
或水军。

u家非senior面试主要还是coding加一点点design,题目感觉中等偏难。如果senior的
话design类问题比重大大增加,而且会有些很难回答的非算法问题,感觉比较考全方位
的软实力。u家基本是一票否决,所以不能弄砸某一轮。最近还在大量招人,不过面的
人也很多,所以还是比较挑剔的导致议价空间也很小。

u家面试很高效,onsite当天或第二天给offer,过两天没消息基本就是挂了,它家
经过5月最新50b估值后standard package慢慢开始low ball了,最近的2级(比senior
低一级)standard range大概是
base: 125-130K
rsu:12000-14000 unit 按39/unit来的
传说中它家基本不negotiate,但个人经验还是可以的,但是你要有比较好的competing
offer。它家现在和g抢人抢的挺凶,所以有好的GF之类的offer还是可以讲的但是操作
空间也不是很大,最后g家给的包裹基本快赶上u了而且全是cash(签uber的第二天g股
票就飙了),选他家主要是在养老公司呆怕了,希望能有点impact,但愿以后不会后悔。

[转载 From MITBBS] LinkedIn, Google, Facebook, Twitter 面经

9月份的面试,连续四天面了LGTF,准备面试的半年多时间来从本版受益匪浅,现在把
面经写出来回馈本版,希望大家把好的传统延续下去。

L
偏重设计,也可能与面的组是platform有关,6个面试有三个是设计,而且涉及很多细
节,比如indexdistribute hash, circule counting. 有一面是manager问项目,个
人觉得选一个自己从头到尾做过的项目,然后按我下面的6点进行准备,基本就够了。 
L
是有题库的,建议多刷版面和glassdoor

G
偏重coding,每一面都是coding开始,而且占很大比例,如果时间多的话可能有两个
coding
,也有可能接一个design问题。

T
的面试最没规律,感觉基本是面试官自己决定问什么,所以这里不怎么好做总结。

F
的面试是最标准化的,两个半coding + 一个design + 半个项目介绍 (项目介绍同上
L), F的题目重现率比较高,看版上的题目就差不多了,design问题基本在之前版
上归纳的几个类别: 设计feedmessage, search,存储,都和大数据沾边。

LFT
面试官大部分是同胞,大部分同胞是很友好,很帮忙的,在此谢过! 但在L碰到一极
品同胞,和老外一块面我,始终一副很屌的样子。在T碰到一个老中manager,一副高高
在上的态度,不断challenge我的过去的项目和跳槽动机。在LT各碰到一个烙印。G
部是白人面试官,都很友好,也是最顺利的面试,感觉G的面试官是最认真负责的,我
在写code的时候,他们也很忙碌的把我的代码和过程记录下来。


准备内容:
1. Coding: 
     Leetcode, 1.5

2.
大数据: 
     Google
的三篇论文 (GFS, Map-Reduce, Big-Table)
     Hadoop, HDFS, HBase (
等同于Google三篇论文,可二选一)
     Amazon Dynamo, Facebook Cassandra (
大数据的另一种存储方式)
     CAP theorem, Distribute Hashing, Consistent hashing, Eventual 
Consistent
3.
系统设计:
    Multi-Thread
    Message Queue, Memory Cache
    Facebook, Twitter
的一些tech talks

Coding
1.
问问题,理解题意,弄清楚输入、输出、流程,磨刀不误砍柴工
2.
多想几种解法(brutal force开始),简单例子,test case,画图 510分钟
3.
与面试官交流想法     2分钟
4. Pseudo code
在草稿纸上 , 分成子函数,模块化,将复杂问题交给子函数
5. Real code 
在答题板上          1020分钟
6. Verify,
检查错误,特殊条件,边界条件  5分钟 

OO Design
1.
需求分析,问问题,列出input, output, use cases
2.
讨论性能要求和Specification, 讨论不同方案trad-off, 方便读还是方便写, 
push
还是pull来发送更新
3.
分析流程,将用use cases转换成use scenario, 可以用(Given, When, Then)关键
词描述
    eg:
取款流程
    Give a person has a bank account with balance 100
    When the person withdraw 30
    Then the balance will be changed to 70
4.
根据use scenario设计data model
   
将上面例子中的名词抽取出来作为对象或属性,动作抽取作为方法
     class Person{
          long personId;
          List<BankAccount> accounts; 
     }
     class BankAccount{
          long accountId
          double balance;
     }
     class AccountService{
          boolean withdraw(long personId, long accountId, double amount){}
          double deposits(long personId, long accountId, double amount){}
          double getBalance(long personId, long accountId)
     }
5.
然后考虑高并发情况下,如何提升Scalability. 可以往LoadBalance, Partition/
Shading
cache等方面考虑, 讨论各种方式的优缺点

项目准备,选一个自己从头到尾做过的项目,先准备一个简单介绍,然后根据根据下面
6
点准备具体内容
1. Most challenging:  complexity legacy system, no testing, scalability
2. What you learn:   unit test, decoupling, gray deployment
3. Most interesting:  automatically test framework
4. Hardest bug:  race condition /  dead lock
5. Conflict with teammates: configuration migration
6. Failure: full dial up cause big issue // don't be too optimist // be 
careful all the time 


面试题
1. Find influencer, BF n^n, optimize to O(n)
2. sqrt(double x, double dlta)  lg(x/dlta), m+dlta??, m - dlta??
3. Design a Message store system  (in-memory storage) [seq_id, len, data] 
chunk
4. Design monitoring system, circular array, storage, aggregation 
5. Hiring manager, Project description
6. Design a key / value system, put, get, delete (copy on write)

1. Longest increasing sub-array?  O(n), better than O(n)
    Design a dropper box system.
2. Sort by type and timestamp
    Num of routers
3. (startTime, endTime, load), find max load in a certain 
4. Coding program to record event count
5. Largest summary in sub-array
    Design tiny url

1. Present project
    Copy Linked list with node point to other
2. Boogle, Trie
3. Design a feeds system, write and query
4. Find longest sub-array with sum to K 

Update: 有人问key - value的设计题,这是我的一些理解,欢迎大家讨论指

这是一个很有意思的题目,主要是考高并发下的key value存储系统,我一开始从
distibute hash
入手,讲了讲分布式存储系统,类似 Dynamo. 后来面试官让我设计单
服务器上put, get, delete, update。可以借鉴GFS,比如以64K为存储块(block),
储块大小可以和面试官讨论,如果存储的value比较大,就用大的存储块(GFS64M)
在内存中维护一个Index(Key -> Block), 每次读写操作以存储块为单位,
1. Put:
在内存中写,写满64M,写入硬盘
2. Get:
根据Index找到对应存储块,如果存储块不在内存,从硬盘中读出,按LRU更新
内存中存储块,然后块内顺序查找
3. Delete: 
直接从index上删除key,后台运行一个垃圾回收的程序,专门负责清理,
合并存储块
4. Update
Copy on Write, 先将原来的值copy出来存入新的块,update完成后
update index
,这样可以避免读写冲突的问题。原来的内容会被垃圾回收处理

LinkedIn Interview Questions from Glassdoor

LinkedIn – Glassdoor 面经
permutations (Scramble an array with an equal chance for every value. Return a list of all permutations of an array.).  

Max subarray problem
Print Tree Level by level

1.      Find the shortest path between two words (like "cat" and "dog), changing only one letter at a time. You need to write code on a laptop and explain the code, run time etc?
2. Design round - In a distributed system cluster set-up, you've exceptions on each and every machine. How would get TOP 10 exceptions in last 24 hr time window.

3. Book Keeping round with Manager - lots of book keeping questions why linkedin etc?

4. One more book keeping round this time with one more guy.
There was no unexpected question as such. One of them involved searching in a matrix sorted row wise. The other one involved finding the exponent of a number in an efficient manner. I figured the exponentiation by squaring method and wrote the pseudo code for that which was correct. All in all, nothing unexpected and the questions can be answered with a little bit of practice. 

 Two sum Problem and check if it is a BST

 Consider an X x Y array of 1's and 0s. The X axis represents "influences" meaning that X influences Y. So, for example, if $array[3,7] is 1 that means that 3 influences 7.

An "influencer" is someone who influences every other person, but is not influenced by any other member.

Given such an array, write a function to determine whether or not an "influencer" exists in the array.
 

At the end of a long day of interviews I was asked about a prior success in my career. I was not told that there was a second more critical part of the interview - another coding exercise at the whiteboard.

Code a non blocking thread safe queue
and
code a text justification routine (Given a line length insert white space so text is uniformly displayed within the given length).

Both are fairly straightforward, but I had spent time on the first portion.
 

How would you design amazon.com?   View Answer
Program an iterator for a Linked List which may include nodes which are nested within other nodes. i.e. (1)->(2)->(3(4))->((5)(6). Iterator returns 1->2->3->4->5->6  

1.      mobile backend system design
2. security system design
3. DP question
4. binary tree question (encode in a line and decode)
  
  1. Implement a shooting algorithm for the game of Battleship.   Answer Question
  2. Implement an algorithm to convert an integer into a roman numeral string and vice versa. 

Implement a hash table

Given a list of numbers L, output a list of numbers where the value at index i is the product of all values in L, excluding the value at index i.

Solve this without using division.

How to write a deep iterator.

 Implement an RPN calculator in Java
One interview was on system design where they asked me to implement my own web crawler system. Again very technical and deep. I didn't know much about search systems so didn't do very well here. Two interviews focused on coding. First was a Dynamic programming question that I had not seen before. Required a bit of help to realize that it was a DP. Was able to write code after I realized the approach. Second coding question was to find the longest arithmetic progression in an array of integers. This was easy.

Implement a function to solve an string given in reverse polish notation. 

 In the first interview: they asked me to implement a pow(base, exp) function. I did a linear solution and they asked me to improve it (time complexity). There's a logN solution for this problem. 

A couple tricky questions. One required writing a modified binary search, the other dealt with data structures and how to efficiently check if a given set of numbers contained two numbers summing to some other number x. 

Implement java's pow function 

None really. Design data structures for different purposes, read a string as a number, write a polish calculator method. 

implement power of POW(double x, int b). Look for special if b<0. write it in O(Log n) time. 

given like +77288.100, a772sb, 2000.00.11.
return if it's a number.
you could either write a regular expression or simply go through the string.
1. it should start with "+/-" or "0-9".
2. there should only have one "." in the string.
3. all other character are "0-9"

 design a key value store 

 Breadth first search  

 implement a concurrent read-write buffer.
Code an RPN calculator with only (+, -, x, /) operations where each operation only takes in two integers as input.  

 Write a function to determine if a string is an integer.
Do you know Design Patterns and can you write a function in java to implement it?  

What is Abstract Class and its use. Gave me a example and asked me to extend and implement its methods   

Write a function to implement BFS.

 The question is how to decide whether the input is a double or not. 
 Traverse a binary there so that the order returned is ordered from smallest to greatest. 
 Find the sqrt of a number

nic interview. 1 coding question and reject.

/**
 * 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' -> 'a'
 */

Onsite:
1. Find the shortest path between two words (like "cat" and "dog), changing only one letter at a time. You need to write code on a laptop and explain the code, run time etc?
2. Design round - In a distributed system cluster set-up, you've exceptions on each and every machine. How would get TOP 10 exceptions in last 24 hr time window.

3. Book Keeping round with Manager - lots of book keeping questions why linkedin etc?

4. One more book keeping round this time with one more guy.

One of them involved searching in a matrix sorted row wise.

The other one involved finding the exponent of a number in an efficient manner. I figured the exponentiation by squaring method and wrote the pseudo code for that which was correct. 

Consider an X x Y array of 1's and 0s. The X axis represents "influences" meaning that X influences Y. So, for example, if $array[3,7] is 1 that means that 3 influences 7. An "influencer" is someone who influences every other person, but is not influenced by any other member. Given such an array, write a function to determine whether or not an "influencer" exists in the array. 

Code a non blocking thread safe queue
and
code a text justification routine (Given a line length insert white space so text is uniformly displayed within the given length).

·         How would you design amazon.com?   View Answer
·         Program an iterator for a Linked List which may include nodes which are nested within other nodes. i.e. (1)->(2)->(3(4))->((5)(6). Iterator returns 1->2->3->4->5->6  


1. mobile backend system design
2. security system design
3. DP question
4. binary tree question (encode in a line and decode)   Answer Question

 Three of the interviews were similar in format to the phone screen where a shadow interviewer would sit in on the interview. Two of these interviews were coding interviews where I was asked to write code on a white board. The third interview was a design interview where I was asked to design an object oriented web application. The fourth interview was with a hiring manager and seemed more to determine if I would make a good personality fit.

I heard back at the end of the week that I had been extended an offer.

Given a list of numbers L, output a list of numbers where the value at index i is the product of all values in L, excluding the value at index i.

Solve this without using division. 

How to write a deep iterator.
 Implement an RPN calculator in Java

One required writing a modified binary search, the other dealt with data structures and how to efficiently check if a given set of numbers contained two numbers summing to some other number x. 

read a string as a number, write a polish calculator method.

read a string as a number, write a polish calculator method.

 given like +77288.100, a772sb, 2000.00.11.
return if it's a number.
you could either write a regular expression or simply go through the string.
1. it should start with "+/-" or "0-9".
2. there should only have one "." in the string.
3. all other character are "0-9"
that's it.  

** Onsite Interview (6.5 hours)
2x simple coding interviews, 1x design architecture interview, 1x interview with higher up management + lunch, 1x HR.

I would not recommend people to apply or work at this company because management issues can be seen even during the interview process:
1) Each interview you get a senior interviewer and a junior interviewer, during the interview I can see the junior interviewer trying to please the senior interviewer and get attention from the senior interviewer.
2) Higher management guy I met with did not have fond words to say about LinkedIn. When we had lunch, we bumped into a lot of people but no one greeted him. I did not get a feeling that higher management is very liked/approachable by others in the company.

Code an RPN calculator with only (+, -, x, /) operations where each operation only takes in two integers as input. 

 Write a function to determine if a string is an integer.  

·         Do you know Design Patterns and can you write a function in java to implement it?  Answer Question
·         What is Abstract Class and its use. Gave me a example and asked me to extend and implement its methods   Answer Question
·         Write a function to implement BFS. 

Write an iterative version of a recursive function. Yes, it sounds basic, and yes it's easy to do for many problems (tree walking, Fibonacci series, etc). This wasn't one of the straightforward cases.  

double rpn(List<String> ops)' to compute some result using RPN. 

In the final session, the interviewer asked me to pick my favorite project and describe the design in detail. Actually, the paraphrased question was 'you just hired a new developer on this project, how would you get him/her up to speed on developing this new feature'. I described a bit about project and release management logistics, but they were more interested in hearing about and seeing class diagrams, module, component, and network topologies. Finally, the question that threw me off a bit was (since the project I described happened 10 years ago): how would you modernize the project for 2012? What different components or approaches would use and why?

·         How would you design an enhancement to the LinkedIn homepage that displays 24-hour trailing lists (5-minute, 1-hour, 1-day) of the top 5 URLs that users post onto the site?   View Answer
·         Given an interface called IntStream with methods 'bool hasNext()' and 'int next()', implement the function 'IntStream merge(IntStream[] streams)' where each input IntStream produces strictly increasing, possibly infinite number of, integers, and the resultant IntStream also produces strictly increasing integers by merging the input streams. The interviewer also provides a simple test harness that prints the first 5000 integers from that function.   Answer Question
·         Given a single-line text string and a maximum width value, write the function 'string justify(string text, int maxWidth)' that formats the input text using full-justification, i.e., extra spaces on each line are equally distributed between the words; the first word on each line is flushed left and the last word on each line is flushed right. 


Write a routine to find all collinear points in a plane. Constraint: The time complexity cannot be greater than O(n^2). 

 check if a given string is a number

Second one was to write a deep iterator. 
·         Describe your recent project. The reason why you leave the current job.   Answer Question
·         Find maximum successive sum in a array   Answer Question
·         given an article, output in a format that for each line, spaces between words are equal. (If impossible, how to deal with)   Answer Question
·         Reverse words in a sentence  

How u would build a site providing url shortening service.
 How would you improve LinkedIn's personal profile page

This time it was a tough question about writing a program where given a sorted array, repetitions allowed, and given an integer, I had to return the start index and end index of that integer in the array. I chose the Binary Search approach but some modifications had to be made to make it optimistic in run-time.

Find a number in a matrix which is sorted by row and column  

How do you design the monitoring system for linkedin servers?
Some C, C++ questions..also on Data structures...   Answer Question
How do you design the reporting system for linkedin servers

Given a large document and a short pattern consisting of a few words (eg. W1 W2 W3), find the shortest string that has all the words in any order (for eg. W2 foo bar dog W1 cat W3 -- is a valid pattern) 
 Intersection of 2 number arrays.
Design a scalable server for the hangman game


·         Design and implement LRU cache   View Answer
·         Reverse a linked list   View Answer
·         Online system design for monitoring   Answer Question
·         How do you rampup someone fresh from school  

Design and code a system that can accept millions of events in real time and report the number of events for the last 10 minutes (sliding window). The system has to account for performance and concurrency. 
 filteriterator hasnext() and next() function 

 Design a hangman game

·         2 integers that add up to a sum in an array.   Answer Question
·         Top 3 integers in an array   Answer Question
·         Top million word counts in a very large data set like web.   Answer Question
·         Online hangman. About security scaling session stAte etc 

Check if an element is present in a completely sorted 2D array.

Its an easy problem to code, if you can figure out the right approach. 
designing hangman web application

·         Given a unbounded non-block queue, implement a blocking bounded queue   View Answers (2)
·         Give an array that has only the values 1, 2 or 3, sort the array in place. 

·         which project you did before you like most   Answer Question
·         consider a B2C website like Amazon, which will receive thousands requests from buyer per minutes. How will you design the "shop cart " component for it? where should the customs' shop cart data stored? 

·         implement a O(1) min function for Stack   View Answers (6)
·         implement LRU cache 

·         Explain how hashmap is implemented, particularly the put() method.   Answer Question
·         Two cooperative threads, how do you make one thread yield until certain condition is met. 

·         MergeSort   Answer Question
·         Cache design

·         Given a list of numbers, find the contiguous sublist that has the largest sum.   View Answers (5)
·         Given a sorted list of integers, an arbitrary split is made such that the end of the first list is appended to the first, i.e.:

1 2 3 4 5 6 7 8 becomes:

6 7 8 1 2 3 4 5

Find the index of a number N in the array, returning -1 if it does not exist.

determine if a graph is bipartite  
Given an array with duplicate elements give an algorithm to get the count of distinct elements in the array

·         design LRUCache   Answer Question
·         explain about scalability for web applications 

Given a grid of size m by n, write an algorithm that computes all paths from 0,0 to m,n such that you can always step horizontally or vertically but cannot reverse. 
Reverse a single linked list.