May 2009 - May 2017 论坛八周年-你的足迹,我的骄傲



查看: 1028|回复: 0

[找工就业] Google Intern 面经

[复制链接] |试试Instant~ |关注本帖
invinsibility 发表于 2016-2-20 04:17:23 | 显示全部楼层 |阅读模式

2016(1-3月)-[]EE博士+<3个月短暂实习/全职 - 内推| 码农类实习@Googlefresh grad应届毕业生


您需要 登录 才可以下载或查看,没有帐号?获取更多干活,快来注册

(1) [size=14.6667px]In an array of integers, given a window size k, print out the maximum integer value in each window inside that array, starting at the front of the array.
[size=14.6667px]我用maxheap 做的, time complexity O(nlog(k)). n is the length of the array.

[size=14.6667px](2) Give a directed acyclic graph (DAG) of size n, and we convert it to a tree (do not have to be a binary tree). What is the maximum number of nodes for this tree?
[size=14.6667px]没有coding, 只要求推公式。 答案是
[size=14.6667px]n = 1, max = 1
[size=14.6667px]n = 2, max = 2
[size=14.6667px]n = 3, max = 4
[size=14.6667px]n = 4, max = 8
[size=14.6667px]n, max = 2 ^ (n - 1)
[size=14.6667px]. 1point 3acres 璁哄潧

[size=14.6667px]二面:. from:
[size=14.6667px](1) Given an array of coins A = [1 2 5 10], and a target num N. Find out the minimum number of coins that add up to N.鏈枃鍘熷垱鑷1point3acres璁哄潧

[size=14.6667px](2) [size=14.6667px]Sorted array A of size N, with duplicates allowed, [size=14.6667px]Find one of the most popular elements, where popular is element which occurs > N/4 times


补充内容 (2016-2-20 04:18):



一亩三分地推荐上一条 /5 下一条

手机版|小黑屋|一亩三分地论坛声明 ( 沪ICP备11015994号 )

custom counter

GMT+8, 2017-5-28 05:43

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

快速回复 返回顶部 返回列表