System Design or OOD
有一个event manager,设计subscribe和pushfangfa。
设计门禁刷卡。 .google иDesign tic tac toe
384 shuffle cards,其实就是lc里的shuffle an array套了个马甲
design linux find command input是文件名(abc.txt)或者文件的size,和一个文件夹名称,要求返回该文件夹下所有符合要求的(名字一样或者size一样)的所有文件
一轮Linux find 感觉蛮常见的 面试官期望你设计接口 并写出来些代码的 https://leetcode.com/discuss/int ... -Linux-Find-Command
讨论帖也可以看这个 里面的解法很复杂 没看懂。。我觉得要事先写写 想一个简单的答案 https://www.1point3acres.com/bbs/thread-431400-1-1.html
Given a linux command such as "ls", how would you create a function that prints out its directories (OOD). How do you abstract it out. For example if you have a "ls" and "< 50mb" how would you write that function?
找root文件下的路径,可以用dfs做
design a URL shortening service
system design。 有个项目, 作者通过公司卖书。 公司找到第三方出版公司。 每周, 第三方公司上传CSV文档。 问题是设计出API 读取CSV 文档,call另外一个已经有的API 计算钱。 这里只需要设计出读取CSV的程序。 主要考的是多线程。但是要考虑读取文档快, 调用API慢。不可能每读一次都创建一个线程。
359 写一个rate limiter[/hide=200]
system design: tiny url
Write classes and interfaces to define Amazon devices such as echo dot, displays, etc..
design parking lot
design a file system
很nice的一个白人大哥,问题是organization chart,设计一个class来表示organization chart,其中的property/field/function需要满足类似下面
(1) root是Bezos,他下面管A,B,C三个人,A管D和E, B管F, C下面没有emplooyee,D下面管G,E下面还管H。. .и
(2) 写一个function来list out某个employee下面所有的reports/followers。
(3) 写一个function来返回deepest leaf。
(4) 写一个function来找出来两个employee的最近的common ancestor。
manager面,设计一个ETL系统,data source是三个:
(1)存在disk上的files,
(2)mysql里的一个relational表,
(3)oralce里面某个表的某个comment column,也就是需要自己从那个column里面提取信息.
(4)数据量大概在20+million。data destination是relational的sql server表。问怎么设计这个ETL。当时满脑子都是怎么设计uber,yelf,ticketmaster以及parking lot,restaurant之类的我就震惊了。面经里也没讲过问这个的啊。
系统设计,大致设计一个数据获取系统,获取hierarchy data。数据的hierarchy大致是这样的 token(1) -> publisher (10) -> companine(100) -> ads(1k)。括号里面的数字表示数量,比如publisher(10)表示,每个token有10个publisher。然后每一级自身也存储有一些数据。比如每天token除了存储有自己的children(10个publisher id)以外,还包含token本身的一些数据,数据可以generalize为key val pair,但是各种类型的(浮点,布尔,字符串)等都会有。初始的时候有一个token id。
(1)题目要求是,设计一个系统,每天到时间后,通过api call的方式,从外部的web service获取所有这些数据,然后将其存储到一个内部的存储系统里面。
design television tv show
给的一道api设计题,一个函数读入是在特定时间的气温信息,另一个函数输出在一个时间段的最高,最低,平均气温信息。followup: 增加地点信息,还有一个followup真的记不得了
设计一个stack, 设计一个maxstack. --难点在于区分有一个O(n) 复杂度的功能
系统设计: 设计whatsapp -- 九章系统设计第五课有详细讲解
Design a theater
design image share application, 如何设计一个图片分享的app,支持群组分享,用户点赞等功能,注重CAP里的AP, graph database是一个考核重点
system design,设计Amazon lock,用户说一个地址,根据包裹大小,availablity,返回一个list of amazon lock。然后设计怎么存取(取的时候要用pin),怎么update availablity。
ood,大概是有一个图,上面有很多小岛,每个岛之间有路径相连,路径有不同的种类,不同的路径可以通过不同种类的车辆。(比如自行车,卡车,飞机什么)
根据这个设计ood,然后给你已有的载具信息,判断能不能从A点到B点。
autocomplete, 用tries秒掉了。很nice的国人小姐姐。. 1point3acres.com
第五面bar raiser,给package之间的dependency关系,和要安装的package object,输出安装的顺序。followup是判断有没有环。
这道题dependency是存在class里面的,类似于
class Package { . 1point 3 acres List<Package> dependency;
void install();
}
也就是给你package a,你只知道a的dependency是b c,然后要去package b,c里面找他们自己对应的dependency。
这道题千万不要用in degree topological sort,和我一起面试的小伙伴就是因为这个挂掉的。面试官期望的方法是recurion,还好我说到一半感觉面试官脸色不对赶紧换approach。
最后问复杂度,我心里想的复杂度是O(n^2),因为对于n个点,edge的数量是O(n^2),每条edge代表一个dependency,不管怎么写程序,一定会遍历每条edge(也就是dependency),但估计面试官希望看到的答案是O(n),所以说了个O(n),面试官也没再问下去。
怎么设计现实歌词,说了API怎么设计,怎么设计缓存和怎么减少缓存丢失,感觉这轮可能没答出他们想要的
亚麻在线视频系统
phone book design
Design Yelp, e.g. how to list the restaurants near by? How to store the data? Etc..[/hide]. 1point 3 acres
yelp比较大,面试官让我主要设计搜索餐馆和推荐餐馆,我当时在设计数据库的时候有点纠结于如何快速索引附近的餐馆,能想到的就是基本当前坐标x,y,寻找|x1 - x| <= a && |y1 -y| <= a,这基本是搜索一个正方形,但是后来回家查查更好的办法是Geohash,这个视频里面有详细介绍:-baidu 1point3acres https://www.youtube.com/watch?v=tu6QKpV7GiI
Design Amazon Locker,这个基本是OOP design为主,需要考虑快递员和顾客都需要access,然后设计各个类之间的接口,相对于yelp要简单一些。. 1point3acres
desing a logging system.
system design: News Feed
OOD设计一个权限管理系统,有用户,文件,和指令,管理每个用户对各个文件的权限
OOD设计了国际象棋.
system design...设计浏览历史
设计video streamming platform。
BQ 总结
35 behavioral questions asked in 95% of Amazon interviews with examples
Team / time management https://youtu.be/CQG4Ui0oAmk
1. Tell me about a time when you were not able to meet a time commitment. What was the outcome and what did you learn from it?.
2. Describe a long-term project that you managed. How did you keep everything moving along in a timely manner?. .и
3. Give me an example of a time when you set a goal and were able to meet or achieve it
Adaptation https://youtu.be/ys7fLcH5gpg .--
4. Tell me about a time you had to quickly adjust your work priorities to meet changing demands.
Team / decision https://youtu.be/3NExTeMnobU
5. an example when you had to push back to HQ or challenged a decision
6. Tell me about the toughest decision you've had to make in the past six months
7. Tell me about a decision that you regret.
Team / leadership https://youtu.be/Tg6BVRTsuic
8. What did you do when you needed to motivate a group of individuals? ..
9. Tell me about a time you stepped up into a leadership role. ----
Team / communication & negotiation https://youtu.be/UJXkaide9bU . .и
10. Do you collaborate well?
11. Describe a situation when you negotiated with others in your organization to reach agreement.
Team / coworkers https://youtu.be/ZsxkoZdyEcw
12. We've all had to work with people that don't like us. How do you deal with someone that doesn't like you?
Clients https://youtu.be/OFEUzyB12rE
31. We all deal with difficult customers from time to time. Tell me about a challenging client-facing situation and how you handled it.
32. How do you show customer obsession?. 1point3acres
Failure https://youtu.be/eaUUeFoB9CQ . Χ
33. Tell me about a time you recovered from a difficult situation
34. Tell me about a time you failed and what you learned from it
35. Why Amazon https://youtu.be/H_KGM0i9jkA
. Waral dи,
先说一下BQ吧,我就是按照这35个问题,基本每个都写了自己的故事,最后中间去掉重复,有25个不同的故事。
作为故事的主角,你一定要特别熟悉,其实按照STAR来准备,自然而然故事就丰富了. From 1point 3acres bbs
. 1point3acres
然后说一下System Design的复习资料: https://www.hiredintech.com/classrooms/system-design/lesson/52
这个网站挺详细的,对于没有基础的人