注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
简答题:
1. For a game app, what are the pros and cons preload hints on app vs not preloaded。 Hints can be text, image or video clip
2. For Spotify app, what concerns do you have if we use consistent hashing to distribute different songs to different servers
3. If we want launch a find nearby friends app globally, how to scale the backend and any concerns
coding 1: check if you reach destination after a list of instruction, move left, right, jump, obstacle, 这个比较简单
coding 2: 理解题意半天,其实不难,但是没时间了
/*
You are planning out a trek across a snowy mountain. On the mountain it snows in the morning, the snow melts with the sun in the afternoon, and in the evening you can attempt a crossing.
* Snow piles up at each location, making that location higher.
* If it has not snowed at a particular location for 2 days, the snow there starts melting on the afternoon of the second day, at a rate of one unit per day.
* You can climb up and down one level while moving to the next position.
* The player needs to cross thonly one climb is required
best_day_to_cross(altitudes_2, snow_2) -> [0, 0] day zero is the best day to cross
best_day_to_cross(altitudes_3, snow_3) -> [2, 0] zero climbs are required at the end of day two
best_day_to_cross(altitudes_4, snow_4) -> [-1,-1] no viable days, the steps are always too high
best_day_to_cross(altitudes_5, snow_5) -> [5, 1] melting can continue over a few days
best_day_to_cross(altitudes_6, snow_6) -> [0, 4] it requires 4 climbs
Complexity variables:
A - number of altitude positions
D - number of days in the forecast
*/ |