Panda Guru LogoPanda
Guru

Meesho | Machine Coding | SDE-1 ( Backend ) | Oct. 2024 | Offcampus

Round 1: Online Assessment

Questions:

  1. Finding the number of pairs of a^b <= a&b in a given array.
  2. Some string questions, it was quite easy.
  3. Some combinatorial question (hard, but there were wrong test cases).
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 2: Machine Coding Round

Questions: Question: Design an order management system for e-commerce.
The main functions to be implemented are:

  1. addProduct(productid, quantity)
  2. createOrder(orderid, list of product ids and their corresponding quantities)
  3. confirmOrder(orderid)
  4. getStock(productid)

The interviewer mentioned that we want to block the inventory of a product when createOrder is called, and reduce the stock when confirmOrder is called.

Candidate's Approach

The candidate initially created a cancelOrder function to refill the inventory if an order was canceled. After some discussion, the candidate proposed using two variables: one for the fully available product count and another for the not yet confirmed but in-order product count. The interviewer was happy with this approach, but due to time constraints, the candidate could not implement the changes or run any test cases.

Interviewer's Feedback

The interviewer was happy with the overall low-level design (LLD) but suggested that the candidate could improve on clarifying requirements and time management.