<
回复: 3
收起左侧

Stubhub Senior Engineer Interview

本楼:   👍  0
0%
0%
0   👎
全局:   51
80%
20%
13

2023(10-12月) 工程类 本科 全职@Stubhub - 猎头 - Onsite  | 😃 Positive 🙂 EasyFail | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
Result: Stubhub rejected me because I don't have "enough experience."

Interview 1:
You interview with a hiring manager who asks about some of your projects and the tech stack that you use. 30 minutes.


If you pass, then you have a coding and system design interview:


Coding:
  1. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">``` </font></font>
  2. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;"># My Notes: </font></font>

  3. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">- Make sure to ask if the timezone matters, e.g. do we need to send a batch of notifications </font></font>
  4. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">  at 12 PM Eastern Time and another batch at 12 PM Pacific Time? </font></font>
  5. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">- Ask clarifying questions, like what if there is a tie where two events happen at the same time. </font></font>
  6. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">  What should you do in that scenario? Just take the first event. </font></font>

  7. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">""" </font></font>
  8. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">The solution you are writing is part of a marketing engine for our StubHub website. </font></font>
  9. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">You will be implementing the setup and business logic for different marketing campaigns that find “relevant” events for a user and notifies them accordingly. </font></font>
  10. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">We are first looking for the correctness and performance of your solution, but also the extensibility and long-term maintainability. </font></font>

  11. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Q1 </font></font>
  12. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    This code is missing some key elements. Define the MarketingEngine class and implement a send_customer_notifications method to notify the customer of all the events happening in the same city as the customer. </font></font>

  13. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    While in the real world we would notify the customer of these events via email or text, for the purposes of this exercise, we want you to output the text content we intend to send to the customer and print it to the console. </font></font>

  14. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    Please note that this method will be invoked multiple times for multiple different customers. </font></font>

  15. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Q2 </font></font>
  16. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    Extend the solution to add a new campaign which sends a notification to the customer with the event closest to their next or upcoming birthday. </font></font>

  17. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    Please note that this campaign will be run multiple times for multiple different customers. </font></font>
  18. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    # Just pick the first event </font></font>
  19. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    # 100_000 customers </font></font>
  20.    
  21. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Q3 </font></font>
  22. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    We now need to implement a new campaign that notifies the customer of the 5 closest events to the customer based on the distance between the customer and the event. </font></font>

  23. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    You should assume that we have about 10 million events and we need to call this per user. </font></font>

  24. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Q4 </font></font>
  25. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    In the stubhub backend we have a simple restful api that you can call that will return prices for events: </font></font>

  26. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    For all event prices: https://sh-mockapi.azurewebsites.net/api/ticketprice </font></font>

  27. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    For a price per event: https://sh-mockapi.azurewebsites.net/api/ticketprice?eventId={EventId} </font></font>

  28. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    ie https://sh-mockapi.azurewebsites.net/api/ticketprice?eventId=1 </font></font>

  29. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    Can you call this service from your solution to send a notification of the 5 cheapest tickets within a Y mile radius of the customer? We can test with various radiuses. </font></font>

  30. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">""" </font></font>

  31. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">from bisect import bisect_left </font></font>
  32. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">from collections import defaultdict </font></font>
  33. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">from dataclasses import dataclass </font></font>
  34. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">from datetime import datetime, timedelta </font></font>
  35. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">from dateutil import parser </font></font>
  36. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">from math import sqrt</font></font>
  37. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    , 3572), 'Los Angeles': City('Los Angeles', 462, </font><font style="vertical-align: inherit;">    975), 'Boston': City('Boston', 3778, 1566), 'Chicago': City(' </font></font>
  38. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Chicago', 2608, 1525 </font></font>

  39. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">) </font></font>

  40. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">, </font><font style="vertical-align: inherit;">' </font><font style="vertical-align: inherit;">                San Francisco': City('San Francisco', 462, 975), 'New York': City   </font><font style="vertical-align: inherit;">        ( </font><font style="vertical-align: inherit;">' </font><font style="vertical-align: inherit;">New </font><font style="vertical-align: inherit;">                York   </font><font style="vertical-align: inherit;">           ',   </font></font>
  41. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    3572 </font><font style="vertical-align: inherit;">                ,   </font><font style="vertical-align: inherit;">             1455),   </font><font style="vertical-align: inherit;">                '   </font><font style="vertical-align: inherit;">                Los   </font><font style="vertical-align: inherit;">Angeles </font><font style="vertical-align: inherit;">                '   </font><font style="vertical-align: inherit;">        : </font><font style="vertical-align: inherit;">             City   </font><font style="vertical-align: inherit;">    ('Los Angeles', 462, 975), 'Boston': City('Boston', 3778, 1566), 'Chicago': City('Chicago', 2608, 1525), </font><font style="vertical-align: inherit;">' </font><font style="vertical-align: inherit;">San </font><font style="vertical-align: inherit;">                Francisco </font><font style="vertical-align: inherit;">    ': City('San Francisco', 462, 975), </font><font style="vertical-align: inherit;">    'New York': City('New York', 3572, 1455), 'Los Angeles': City('Los Angeles', 462, 975), 'Boston </font><font style="vertical-align: inherit;">    ': City('Boston', 3778, 1566), 'Chicago': City('Chicago', 2608, 1525), </font><font style="vertical-align: inherit;">    'San Francisco': City('San Francisco', _date: datetime class Customer: id: int name: str city: str birth_date: datetime class MarketingEngine: </font><font style="vertical-align: inherit;">    def __init__(self, events: List[Event]): now: datetime = datetime.now() self.events: List[Event] = [ </font><font style="vertical-align: inherit;">    event for event in events if </font><font style="vertical-align: inherit;">event.event_date </font><font style="vertical-align: inherit;">>= now ] self.city_to_events: dict[str, List[Event]] = [ event </font><font style="vertical-align: inherit;">    for event in events if event.event_date >= now ] self.city_to_events: dict[str, </font><font style="vertical-align: inherit;">List </font><font style="vertical-align: inherit;">    [ </font><font style="vertical-align: inherit;">        Event </font><font style="vertical-align: inherit;">        ] </font><font style="vertical-align: inherit;">    ] = [ event for event in events if </font><font style="vertical-align: inherit;">    event.event_date >= now </font><font style="vertical-align: inherit;">    ] </font><font style="vertical-align: inherit;">    self.city_to_events </font><font style="vertical-align: inherit;">    : </font><font style="vertical-align: inherit;">    dict </font><font style="vertical-align: inherit;">[ </font><font style="vertical-align: inherit;">    str, List </font><font style="vertical-align: inherit;">[ </font><font style="vertical-align: inherit;">    Event </font><font style="vertical-align: inherit;">        ]] = [ event for event in events if event.event_date >= now </font><font style="vertical-align: inherit;">        ] </font><font style="vertical-align: inherit;">        self.city_to_events: dict[str, List[Event]] = [ </font><font style="vertical-align: inherit;">        event </font><font style="vertical-align: inherit;">            for event in events if event.event_date >= now ] </font><font style="vertical-align: inherit;">defaultdict(list) </font><font style="vertical-align: inherit;">        for event in self.events: </font><font style="vertical-align: inherit;">            self.city_to_events[event.city].append(event) </font><font style="vertical-align: inherit;">        event_date_to_event: dict[datetime, Event] = {event.event_date: event for event in self.events} </font><font style="vertical-align: inherit;">        self.events_sorted_by_date = sorted( </font><font style="vertical-align: inherit;">            event_date_to_event.values(), key=lambda event: event.event_date </font><font style="vertical-align: inherit;">        ) </font><font style="vertical-align: inherit;">        self.closest_threshold: int = 5 </font><font style="vertical-align: inherit;">        self.prices_ttl: timedelta = timedelta(days=1) </font><font style="vertical-align: inherit;">        self.last_price_cache:datetime = datetime.now()</font></font>
  42. <font style="vertical-align: inherit;"></font>
  43. <font style="vertical-align: inherit;"></font>
  44. <font style="vertical-align: inherit;"></font>
  45. <font style="vertical-align: inherit;"></font>
  46. <font style="vertical-align: inherit;"></font>

  47. <font style="vertical-align: inherit;"></font>
  48. <font style="vertical-align: inherit;"></font>
  49. <font style="vertical-align: inherit;"></font>
  50. <font style="vertical-align: inherit;"></font>
  51. <font style="vertical-align: inherit;"></font>
  52. <font style="vertical-align: inherit;"></font>
  53. <font style="vertical-align: inherit;"></font>
  54. <font style="vertical-align: inherit;"></font>
  55. <font style="vertical-align: inherit;"></font>
  56. <font style="vertical-align: inherit;"></font>

  57. <font style="vertical-align: inherit;"></font>
  58. <font style="vertical-align: inherit;"></font>

  59. <font style="vertical-align: inherit;"></font>
  60. <font style="vertical-align: inherit;"></font>
  61. <font style="vertical-align: inherit;"></font>
  62. <font style="vertical-align: inherit;"></font>
  63. <font style="vertical-align: inherit;"></font>
  64. <font style="vertical-align: inherit;"></font>
  65. <font style="vertical-align: inherit;"></font>
  66. <font style="vertical-align: inherit;"></font>
  67. <font style="vertical-align: inherit;"></font>

  68. <font style="vertical-align: inherit;"></font>
  69. <font style="vertical-align: inherit;"></font>
  70. <font style="vertical-align: inherit;"></font>
  71. <font style="vertical-align: inherit;"></font>
  72. <font style="vertical-align: inherit;"></font>

  73. <font style="vertical-align: inherit;"></font>
  74. <font style="vertical-align: inherit;"></font>
  75. <font style="vertical-align: inherit;"></font>
  76. <font style="vertical-align: inherit;"></font>
  77. <font style="vertical-align: inherit;"></font>

  78. <font style="vertical-align: inherit;"></font>
  79. <font style="vertical-align: inherit;"></font>
  80. <font style="vertical-align: inherit;"></font>
  81. <font style="vertical-align: inherit;"></font>
  82. <font style="vertical-align: inherit;"></font>

  83. <font style="vertical-align: inherit;"></font>
  84. <font style="vertical-align: inherit;"></font>
  85. <font style="vertical-align: inherit;"></font>
  86. <font style="vertical-align: inherit;"></font>
  87. <font style="vertical-align: inherit;"></font>
  88. <font style="vertical-align: inherit;"></font>
  89. <font style="vertical-align: inherit;"></font>
  90. <font style="vertical-align: inherit;"></font>
  91. <font style="vertical-align: inherit;"></font>
  92. <font style="vertical-align: inherit;"></font>
  93. <font style="vertical-align: inherit;"></font>
  94. <font style="vertical-align: inherit;"></font>
  95. <font style="vertical-align: inherit;"></font>
  96. <font style="vertical-align: inherit;"></font>

  97. <font style="vertical-align: inherit;"></font>
  98. <font style="vertical-align: inherit;"></font>
  99. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        price_data = requests.get("https://sh-mockapi.azurewebsites.net/api/ticketprice").json() </font></font>
  100. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        self.id_to_event = {int(event["Id"]): event for event in price_data} </font></font>


  101. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    def send_customer_notifications(self, customer: Customer) -> None: </font></font>
  102. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        # "Sends" notifications via the print method </font></font>
  103. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        print(f"Calling send_customer_notifications for customer {customer.name}") </font></font>
  104. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        result = self.city_to_events.get(customer.city, []) </font></font>
  105. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        print(result) </font></font>
  106.    
  107. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    def send_customer_notifications_by_birthday(self, customer: Customer) -> None: </font></font>
  108. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        # log(|EVENTS|) </font></font>
  109. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        if not self.events_sorted_by_date: </font></font>
  110. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            print(f"No events for {customer}") </font></font>
  111. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        base_birthdate = customer.birth_date </font></font>
  112. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        now: datetime = datetime.now() </font></font>
  113. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        next_birthday = datetime(now.year, base_birthdate.month, base_birthdate.day) </font></font>
  114. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        if now > next_birthday: </font></font>
  115. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            next_birthday = datetime(now.year + 1, next_birthday.month, next_birthday.day) </font></font>
  116. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        print(f"{next_birthday=}") </font></font>

  117. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        idx = bisect_left(self.events_sorted_by_date, next_birthday, key=lambda event: event.event_date) </font></font>
  118. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        # If you're sandwiched between two events, which is closer? </font></font>
  119. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        if idx > 0: </font></font>
  120. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            time_diff_right = abs(self.events_sorted_by_date[idx].event_date - next_birthday) </font></font>
  121. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            time_diff_left = abs(self.events_sorted_by_date[idx - 1].event_date - next_birthday) </font></font>
  122. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            if time_diff_left <= time_diff_right: </font></font>
  123. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">                print(self.events_sorted_by_date[idx - 1]) </font></font>
  124. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">                return </font><font style="vertical-align: inherit;">    def send_customer_notifications_by_proximity(self, customer: Customer) -> None: </font></font>
  125. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        customer_city </font><font style="vertical-align: inherit;">        = CITY_MAP.get(customer.city) </font><font style="vertical-align: inherit;">        if not customer_city: </font><font style="vertical-align: inherit;">            print(f"No city found for {customer}") </font><font style="vertical-align: inherit;">        result = [] </font><font style="vertical-align: inherit;">        nearest_cities = sorted(CITY_MAP.values(), key=lambda city: distance(customer_city, city)) </font><font style="vertical-align: inherit;">        for city in nearest_cities: </font><font style="vertical-align: inherit;">            events = self.city_to_events[city.name] </font><font style="vertical-align: inherit;">            for event in events: </font><font style="vertical-align: inherit;">                result.append(event) </font><font style="vertical-align: inherit;">                if len(result) == self.closest_threshold: </font><font style="vertical-align: inherit;">                    break </font><font style="vertical-align: inherit;">            if len(result) == self.closest_threshold: </font><font style="vertical-align: inherit;">                break </font><font style="vertical-align: inherit;">        print("Closest events: ") </font><font style="vertical-align: inherit;">        print(result) </font><font style="vertical-align: inherit;">    def part_4(self, customer: Customer, radius: int) -> None: </font><font style="vertical-align: inherit;">        customer_city = CITY_MAP.get(customer.city) </font><font style="vertical-align: inherit;">        if not customer_city:</font></font>
  126.    
  127. <font style="vertical-align: inherit;"></font>
  128. <font style="vertical-align: inherit;"></font>
  129. <font style="vertical-align: inherit;"></font>
  130. <font style="vertical-align: inherit;"></font>
  131. <font style="vertical-align: inherit;"></font>
  132. <font style="vertical-align: inherit;"></font>
  133. <font style="vertical-align: inherit;"></font>
  134. <font style="vertical-align: inherit;"></font>
  135. <font style="vertical-align: inherit;"></font>
  136. <font style="vertical-align: inherit;"></font>
  137. <font style="vertical-align: inherit;"></font>
  138. <font style="vertical-align: inherit;"></font>
  139. <font style="vertical-align: inherit;"></font>
  140. <font style="vertical-align: inherit;"></font>
  141. <font style="vertical-align: inherit;"></font>
  142. <font style="vertical-align: inherit;"></font>
  143.    
  144. <font style="vertical-align: inherit;"></font>
  145. <font style="vertical-align: inherit;"></font>
  146. <font style="vertical-align: inherit;"></font>
  147. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            print(f"No city found for {customer}") </font></font>
  148. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            return </font></font>
  149. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        now = datetime.now() </font></font>
  150. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        if now - self.last_price_cache < self.prices_ttl: </font></font>
  151. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            price_data = requests.get("https://sh-mockapi.azurewebsites.net/api/ticketprice").json() </font></font>
  152. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            # print(price_data) </font></font>
  153. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            self.id_to_event = {int(event["Id"]): event for event in price_data} </font></font>
  154. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            self.last_price_cache = now </font></font>
  155. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        # 5 cheapest tickets in a y-mile radius </font></font>
  156. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        cities_within_radius = [ </font></font>
  157. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            city for city in CITY_MAP.values() if distance(city, customer_city) <= radius </font></font>
  158. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        ] </font></font>
  159. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        event_ids_in_the_radius: List[int] = [] </font></font>
  160. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        for city in cities_within_radius: </font></font>
  161. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">            event_ids_in_the_radius.extend(event.id for event in self.city_to_events.get(city.name, [])) _ </font><font style="vertical-align: inherit;">        , event in </font><font style="vertical-align: inherit;">        prices_and_events </font><font style="vertical-align: inherit;">        ] </font></font>
  162. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">        ) def main(): events: list </font><font style="vertical-align: inherit;">            [Event] = [ Event(1, "Phantom of the Opera", "New York", </font><font style="vertical-align: inherit;">        parser.parse( </font><font style="vertical-align: inherit;">            "2023-12-23")), # X Event(2, "Metallica", "Los Angeles", "Metallica"), </font><font style="vertical-align: inherit;">        # </font><font style="vertical-align: inherit;">            X </font><font style="vertical-align: inherit;">Event </font><font style="vertical-align: inherit;">        ( 3, "Metallica", "Los Angeles", "Metallica"), # X </font><font style="vertical-align: inherit;">        Event(4, "Metallica", "Los Angeles", "Metallica" </font><font style="vertical-align: inherit;">        ), # </font><font style="vertical-align: inherit;">    X </font><font style="vertical-align: inherit;">("2024-12-02")), # OK </font><font style="vertical-align: inherit;">        Event(3, "Metallica", "New York", parser.parse("2024-12-06")), # OK </font><font style="vertical-align: inherit;">        Event(4, "Metallica", "Boston", parser.parse("2024-10-23")), # OK </font><font style="vertical-align: inherit;">        Event(5, "LadyGaGa", "New York", parser.parse("2023-09-20")), # OK </font><font style="vertical-align: inherit;">        Event(6, "LadyGaGa", "Boston", parser.parse("2024-08-01")), # OK </font><font style="vertical-align: inherit;">        Event(7, "LadyGaGa", "Chicago", parser.parse("2024-07-04")), # OK </font><font style="vertical-align: inherit;">        Event(8, "LadyGaGa", "San Francisco", parser.parse("2024-07-07")), # OK </font><font style="vertical-align: inherit;">        Event(9, "LadyGaGa", "Washington", parser.parse("2023-05-22")), </font><font style="vertical-align: inherit;">        Event(10, "Metallica", "Chicago", parser.parse("2024-01-01")), </font><font style="vertical-align: inherit;">        Event(11, "Phantom of the Opera", "San Francisco", parser.parse("2024-07-04")), </font><font style="vertical-align: inherit;">        Event(12,</font><font style="vertical-align: inherit;">    # engine.send_customer_notifications </font><font style="vertical-align: inherit;">    ( </font><font style="vertical-align: inherit;">    customer </font><font style="vertical-align: inherit;">    )</font></font>
  163. <font style="vertical-align: inherit;"></font>
  164. <font style="vertical-align: inherit;"></font>
  165. <font style="vertical-align: inherit;"></font>
  166. <font style="vertical-align: inherit;"></font>
  167. <font style="vertical-align: inherit;"></font>
  168. <font style="vertical-align: inherit;"></font>
  169. <font style="vertical-align: inherit;"></font>
  170. <font style="vertical-align: inherit;"></font>
  171. <font style="vertical-align: inherit;"></font>


  172. <font style="vertical-align: inherit;"></font>
  173. <font style="vertical-align: inherit;"></font>
  174. <font style="vertical-align: inherit;"></font>
  175. <font style="vertical-align: inherit;"></font>
  176. <font style="vertical-align: inherit;"></font>
  177. <font style="vertical-align: inherit;"></font>
  178. <font style="vertical-align: inherit;"></font>
  179. <font style="vertical-align: inherit;"></font>
  180. <font style="vertical-align: inherit;"></font>
  181. <font style="vertical-align: inherit;"></font>
  182. <font style="vertical-align: inherit;"></font>
  183. <font style="vertical-align: inherit;"></font>
  184. <font style="vertical-align: inherit;"></font>
  185. <font style="vertical-align: inherit;"></font>
  186. <font style="vertical-align: inherit;"></font>

  187. <font style="vertical-align: inherit;"></font>
  188.    
  189. <font style="vertical-align: inherit;"></font>
  190. <font style="vertical-align: inherit;"></font>

  191. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    # engine.send_customer_notifications_by_birthday(customer) </font></font>
  192. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    # print() </font></font>
  193. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    # print("By proximity: ") </font></font>
  194. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    # engine.send_customer_notifications_by_proximity(customer) </font></font>

  195. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">    engine.part_4(customer, 2000) </font></font>
  196. <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">```</font></font>

复制代码
System Design:
Design a system that will send 1,000,000 recommendation emails to users in 5 minutes. These emails must be sent from 12:00 PM to 12:05 PM.


My answer:

- You cannot create the recommendations within 5 minutes. You must create the recommendations in the
hour or two beforehand.

-Ask your interviewer whether the email service is a black box, or whether you own the service.
When it comes to email, some users will ultimately complain that they aren't getting their
emails even if you send them, so you might need SMTP logs to prove that you're sending the emails.
This is usually easier to do if you own the email service.


- Discuss other problems that accompany email systems, like failure, retries, at-least-once delivery, and dead lettering.


- I gave calculations for the number of worker nodes that we need for the email service. I don't know
whether this is necessary.


- You will be asked about business statistics, etc. that you should collect. Open rate, click through rate,
conversion rate, A/B testing success metrics etc. are the ones you should talk about.


- You will be asked about system metrics to collect. You should collect metrics on email failure, retries, complaints.
You should also figure out how long it takes for the recommendation system to prepare 1,000,000 recommendations.


- You should talk about what to do if each component fails. If the recommendation system fails, you should have default recommendations.


Here is a link to my diagram.


If you pass the system design and coding, then you advance to the behavioral interviews for the onsite.

Director of Engineering Interview

Talk about a project you're particularly proud of. The project can be one you're particularly proud of, or one you've learned a lot from. Be sure to share the
accomplishments from this project; again, noting both technical accomplishments, and data points at how this project impacted the business as whole, are great ways to get your impact across to the team.

Talk about getting blocked by another team.
Talk about a disgreement in priorities with another team.
Talk about a technical challenge that you faced.

Then do your creative pitch. Don't overthink it.



Hiring Manager Interview:


Introductions. He talks about what his teams do. What his roadmap is. He gave me a ton of time to ask questions. The only question he had for me was a time where I had a disagreement with someone else. I asked whether he wanted a technical or interpersonal disagreement. He said either. I went with a technical disagreement.

评分

参与人数 3大米 +12 收起 理由
lc32402 + 1 给你点个赞!
清道神君 + 10 欢迎分享你知道的情况,会给更多大米奖励!
firebird + 1 欢迎分享你知道的情况,会给更多积分奖励!

查看全部评分


上一篇:Lucid Motors Sr. SWE 面经
下一篇:serviceNow 面试流程求解
 楼主| tomzhawang 2024-5-31 11:23:21 | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   51
80%
20%
13
回复

使用道具 举报

地里匿名用户
匿名用户-WULPI  2024-6-7 14:57:58 来自APP
本楼:   👍  0
0%
0%
0   👎
Hey bro! I remember you! I think you joined Netflix less than a year ago, why bother to interview with stubhub?(no disrespect to stubhub folks!)
回复

使用道具 举报

地里匿名用户
匿名用户-RGUBE  2024-6-12 12:30:58
本楼:   👍  0
0%
0%
0   👎
匿名用户 发表于 2024-6-6 23:57
Hey bro! I remember you! I think you joined Netflix less than a year ago, why bother to interview wi ...

I did not join Netflix ¯\_(ツ)_/¯
回复

使用道具 举报

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

本版积分规则

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