Google | L5 | Seattle | Offer
Anonymous User
2170

Got downleved to L4. Took another offer from a FAANG company.

  1. https://leetcode.com/problems/shortest-distance-from-all-buildings/
  2. Design a game canvas class with 3 methods
    • AddRow(int rowNum) - inserts a new row at “rowNum” and copies all the values from “rowNum” into the new row.
    • AddColumn(int colNum) - inserts a new column at “colNum” and copies all the values from “colNum” into the new column
    • Set(int row, int col, char value) - sets a row/col with the specified char.
  3. You are given a binary tree.
    • Write a function that collects leaves and their parents recursively (convoluted way of saying post order traversal).
    • Collects leaves first, then their parents and so on. (level order traversal from the bottom).
  4. Design an ad exchange service that can scale up to 100K qps.
    • Flow: User navigates to cnn.com. The javascript code on cnn.com's page calls your ad exchange service to get an ad.
    • The ad exchange simply calls 20 different services - all of them implement an API to return a bid amount. Your ad exchange service should choose the highest bid amount and serve that ad.
    • How will you minimize latency?
    • How will you handle blacklisted ad URLs?
    • How will you monitor the service?
    • Which compute platform will you use?
Comments (2)