Microsoft | SSE | Bangalore
Anonymous User
1774

Round 1

  • Design a stock market service (Both HLD and LLD). It should have below three apis

    1. PUT /stock
      Body:
      {
      stock_symbol: "MICROSOFT"
      stock_value: 22
      }

    2. GET /stock/{stock_symbol}
      return stock_value

      1. GET /stock/stock_symbols // returns stock_symbols in a given range of values
        Parameter: lower stock value, upper stock value
        return stock_symbols
  • There are two type of threads HydrogenThread and OxygenThread. HydrogenThread prints "H" and OxygenThread prints "O". Write multithreaded program to produce series of characters such that for two H there is one O. for Ex:HHO HOH HHO OHH HOH .........

Round 2

  • Given a set of documents with unique ids. Delete documents in a given range of ids [lower, upper]. There are millions of documents. Deletes are async. Between delete request and physcial deletion of document any get document request should return "document is deleted".

Round 3

  • Design a service A that connects to a 3rd party service. 3rd party service can serve X requests/sec. There could be thousands of request/sec to service A. The main requirement here was to reduce service A request latency.
Comments (1)