📣 Back to School开学季 - VIP通行证5折优惠!蓝莓、Offer多多同步优惠
楼主: guaitt
跳转到指定楼层
上一主题 下一主题
收起左侧

[经验总结] 在职刷题 + System Design + 面试准备的路上

   
🔗
 楼主| guaitt 2018-11-17 13:25:47 | 只看该作者
全局:
11月16日
Leetcode
722. Remove Comments
54. Spiral Matrix
59. Spiral Matrix II
118. Pascal's Triangle
119. Pascal's Triangle II
System Design:
How to design Uber: 今天白板了一遍Design Uber, 其workflow为Driver ->report their location every 4s -> Dispatch service -> update location information with 4,5,6 length of Geohash in Location Table(Redis) -> check if there is assigned trip id in Driver Table -> Retrieve Trip information from Trip Table in Dispatch Server -> Driver Accept/Deny/Cancel trip -> Update status in Trip Table in Dispatch Server and Driver Table in Geo Server -> Returned matched user to driver and matched driver to user.  这里User Table 和 Trip Table (trip_id, driver_id, user_id, latitude, longitude, status, created_at) 在Dispatch Server 里为SQL, Location Table (key: geohash, value: set of driver_id) 和 Driver Table(driver_id, lati, longi, status, trip_id, updated_at)为NoSQL使用Redis或者Cassandra.    使用NoSql是因为写操作要求更多,需要不断更新location.
回复

使用道具 举报

🔗
 楼主| guaitt 2018-11-18 13:34:05 | 只看该作者
全局:
11月17日
Leetcode
71. Simplify Path
114. Flatten Binary Tree to Linked List
787. Cheapest Flights Within K Stops
688. Knight Probability in Chessboard
153. Find Minimum in Rotated Sorted Array
今天和小伙伴互相mock了四道题,没时间看system design了,mock的题目都做得不太好,算法还得加强才行,以后争取每天多刷一点。
回复

使用道具 举报

🔗
summerlight 2018-11-19 05:12:08 | 只看该作者
全局:
guaitt 发表于 2018-11-11 12:30
11月10号:
LeetCode:
436. Find Right Interval

请问楼主能详细说下Design Google sheet吗?有什么推荐关于这个设计的视频/blog吗?cell用什么数据结构存啊?
回复

使用道具 举报

🔗
 楼主| guaitt 2018-11-19 12:52:54 | 只看该作者
全局:
stevenlordiam 发表于 2018-11-19 05:12
请问楼主能详细说下Design Google sheet吗?有什么推荐关于这个设计的视频/blog吗?cell用什么数据结构存 ...

这个我看的是youtube 上的,你直接搜就能找到
回复

使用道具 举报

🔗
 楼主| guaitt 2018-11-19 13:25:44 | 只看该作者
全局:
11月18日
Leetcode
657. Robot Return to Origin
74. Search a 2D Matrix
240. Search a 2D Matrix II
42. Trapping Rain Water
15.3sum
明天去onsite,又过了一遍Behavior Question, 感觉已经可以随意应付了。
回复

使用道具 举报

🔗
jajaa 2018-11-19 18:08:07 | 只看该作者
全局:
祝楼主好运
回复

使用道具 举报

🔗
zzwcsong 2018-11-20 10:53:07 | 只看该作者
全局:
想问楼主看的design google doc视频是这个吗?
https://youtu.be/mDYuJoQEowQ

另外祝楼主好运~
回复

使用道具 举报

🔗
 楼主| guaitt 2018-11-20 13:37:46 | 只看该作者
全局:
11月19日
Leetcode
236. Lowest Common Ancestor of a Binary Tree
85. Maximal Rectangle
84. Largest Rectangle in Histogram
138. Copy List with Random Pointer
784. Letter Case Permutation
System Design: How to design User System
首先分析scenario,我们需要的主要功能有login, sign up, retrieve user information, friends information.  这个系统是read heavy. We should use Cache to optimize our system. Service有authentication service, user service, friendship service.  对于authentication service,我们使用session table in DB来记录session_key,用户登录时创建session_key,并放入browser的cookie中,以后每次发生http request时带上session_key,如果session_key没有过期,可以认为是登录状态。User Service使用Memached 来做用户信息的cahce,查询操作首先查询Cahce没有记录则查询DB. Friendship Service明天更。
回复

使用道具 举报

🔗
 楼主| guaitt 2018-11-20 13:39:19 | 只看该作者
全局:
zzwcsong 发表于 2018-11-20 10:53
想问楼主看的design google doc视频是这个吗?
https://youtu.be/mDYuJoQEowQ

Google doc我还没细看,之前看的是Google sheet.
回复

使用道具 举报

🔗
 楼主| guaitt 2018-11-21 13:27:42 | 只看该作者
全局:
11月20日
Leetcode
130. Surrounded Regions
72. Edit Distance
75. Sort Colors
今天太忙了,晚上开会到10点,并且见识了国内的电面,感觉用英语或汉语都差不多,无非就是更随意一些吧,但是算法题还是得说清楚逻辑,用中文表达算法有时候感觉还不如英文好表达....
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

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