google onsite 1

  1. Given a 2D matrix , with obstacles. Start from any of the first row, exit from any of the last row. What is the minimum steps?

000001

000100

000000

000100

step

2. Given a list of buslines, and the stops of each busline, given a start stop, and a end stop, what is the minimum number of transfers to reach the end stop from start stop

815. Bus Routes

busline1: A B C D E F H

busline2: G D H E I

start:B

end:I

List<Buslines1, List<Stops>>   start, end

  1. Find the start, List<Stops>

Map<Stop, Busline> invertedMap

busline1

/ / / \ \ \ \

A B C D E F H

\ \

busline2

/ | \ \

invertedMap:  stop , list<buslines>

3. Given a table of candidates, each has a column of quality score, a minimum salary.


Candidates


QualityScore


MinimumSalary


A


1


1


B


5


20


C


25


20

Also,  if you want to hire A and B both, you must pay A at least 10/5 * 20 = 40 instead of 15.

What is the minimum salary you have to pay in total to hire them all?

follow up. if you only want to hire k out of n candidates, what is the minimum salary you have to pay?

A: 1 , 1, 1

B: 5, 20, 4

C: 25, 20, 0.8

A: 1 , 1

B: 5,20

maxHeap: (n-k)logn

B:4 => A:4

ratio sort  4 1 0.8

quality score:    1 5 25

N choose k

4. Given a box of fixed width and height in pixels, and two APIs getWidth(char c, font), getHeight(char c). Given a string “abc...hi”, what is the maximum font size can you use?

paper width, height

paper fix size

xxxxxxx

xxxxxxx

xxxxxxx

binary search

a

b

c

h

i

0,

5. given a list of subsequence of certain original array, recover the original array.

e.g.[1, 3, 5, 9]

[3, 4, 9]

[4,5]

Then the original array is :  [1, 3, 4, 5, 9]

if no unique solution, return null

1 : 3 , 5, 9

3 : 5, 9, 4

5 : 9

4 : 9, 5

444. Sequence Reconstruction

原文地址:https://www.cnblogs.com/tobeabetterpig/p/9557880.html

时间: 2024-08-05 00:05:11

google onsite 1的相关文章

google onsite Feb 13 2018.

round 1: update 100 unix kernel machines in the moon; round 2: robot, turnright(int k), turnleft(int k), move(), and clean(), 设计一个系统把房间扫干净: round 3: recommendation system for youtube videos. round 4: stock 1 find maximum profit, and all the buying an

《转》---google面经

我面的职位是Softwre Engineer, Tools and Infrastracture, 所以开发和测试的问题都会问到 Phone interview 1:白人小哥.给一个Interval的class, 就是一个区间,左闭右开,比如 [1, 3) 意思是从1到3除了3的所有interger. 让我在这个class里implement一个method, 判断与另一个Interval是否有overlapping.第二问是写一个method, 返回在Interval 1而不在Interval

uber onsite interview reviews

1. 2018-08 marketplace pricing组,data engineer 我们组负责用machine learning models做实时的用户定价,直接影响Uber营收,利润和成长.可以说,我们组的performance相当程度上影响明年Uber上市的股价. 工作当中需要涉及到的系统包括backend server,database,data pipeline,(py)spark等等.编程语言是python和java.工作地点旧金山. 组里的情况是,scope比较大,活多,非

Amazon onsite

onsite5轮+Discussion with HR 由于很人很多,我已经忘记了每个interview的国籍啥的,全是男的,一个印度人,一个亲切的中国人,三个白人.大部分都是behavior question 和project experience, 我没有被直接问到任何tech问题但是在project experience里面会穿插很多与tech相关的问题,比如,你用了什么model,why use it?how to evaluate it?the problem of the model

Google FaceBook Amazon 加州求职记

分享一下我老师大神的人工智能教程吧.零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!http://www.captainbed.net 一年多前,出于显而易见的原因,下定决心肉身FQ.经过一番考虑,放弃了读书这条途径,决定直接找工作,通过H1B签证出去.于是去年八月份从百度辞职,开始着手准备.当时觉得今年拿到H1B的成功率大致能有个六七成,加上周围朋友们的不断鼓励,可以说还是相当自信的.然而,时至今日,在历经Google.Amazon.Facebook三家公司之后,

csharp:Google TTS API text to speech

? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86

国行手机安装GOOGLE PLAY

原文地址:http://blog.sina.com.cn/s/blog_68cff87b0101a96k.html 相信国行的手机都是没有google Play 功能的吧,相比其它国外的手机,功能上逊色不少. 而且国内软件市场比较复杂,偷窥隐私,安装木马,植入广告,耗费流量,这些都是国产软件的公开秘密! 所以想下载一些国外比较流行的软件,第3方软件市场又不安全,想一想还是用google的官方Google Play是最好的. 说干就干,前提是手机必须是root过,Root就是获得手机的最高权限,现

Google帝国研究——Google的产业构成

                                                                                    Google帝国研究--Google的产业构成 摘要:Google帝国研究  产业构成 作者:魏春颖 文章来源:网络整理 Google产业的构成: 1.    业务板块: 包括互联网搜索.云计算.广告技术,开发并提供大量基于互联网的产品与服务,开发线上软件.应用软件,还涉及移动设备的Android操作系统以及操作系统谷歌Chrom

TensorFlow【机器学习】:如何正确的掌握Google深度学习框架TensorFlow(第二代分布式机器学习系统)?

本文标签:   机器学习 TensorFlow Google深度学习框架 分布式机器学习 唐源 VGG REST   服务器 自 2015 年底开源到如今更快.更灵活.更方便的 1.0 版本正式发布,由 Google 推出的第二代分布式机器学习系统 TensorFlow一直在为我们带来惊喜,一方面是技术层面持续的迭代演进,从分布式版本.服务框架 TensorFlow Serving.上层封装 TF.Learn 到 Windows 支持.JIT 编译器 XLA.动态计算图框架 Fold 等,以及