Airbnb 三番上门

  1. 印度人:

There are 10 people at a wizard meetup. Each wizard has levels 0 - 9 (the index of the input) and
knows a few other wizards there. Your job is to find the cheapest way for wizard 0 to meet wizard 9.
Introductions have a cost that equals the square of the difference in levels.

Goal: Level 0 wizard wants to meet level 9 using the fewest possible magic points.
Cost: square of difference of levels
The index of the array represents the level (0-9)
the value is an array with the index of the other people each person knows.

Note that relationships are one directional (e.g. 2 can introduce you to 3 but not vice versa)
// path: [0, 1, 4, 6, 9]:
// MP: cost = (0-1)^2 + (1-4)^2 + (4-6)^2 + (6-9)^2 = 1+9+4+9 = 23 (MP)

  1. 国人小伙 IP2CIDR
    Given a start IP address ip and a number of ips we need to cover n, return a representation of the range as a list(of smallest possible length) of CIDR blocks.

A CIDR block is a string consisting of an IP, followed by a slash, and then the prefix length.For example : “123.45.67.89/20”.That prefix length “20” represents the number of common prefix bits in the specified range.

Example 1 :
Input : ip = “255.0.0.7”, n = 10
Output : [“255.0.0.7/32”, “255.0.0.8/29”, “255.0.0.16/32”]
Explanation :
The initial ip address, when converted to binary, looks like this (spaces added for clarity) :
255.0.0.7 -> 11111111 00000000 00000000 00000111
The address “255.0.0.7/32” specifies all addresses with a common prefix of 32 bits to the given address,
ie.just this one address.

  1. 国人大哥:Design translation system. Airbnbi经典设计题

  2. 两轮背对背BQ - 白男,白女

  3. 国人大哥,给他讲述自己做过的一个项目,中间穿插提问。十分友好。