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

meesho logo
meesho
sde-1 backendoffcampusRejected
October 17, 20240 reads

Summary

I interviewed for the SDE-1 Backend role at Meesho, which involved an online assessment and a machine coding round to design an order management system. Despite a decent approach to the system design problem, I faced challenges with specific inventory locking requirements and time management, leading to a likely rejection.

Full Experience

I participated in an online assessment conducted on HackerRank, which consisted of three coding questions: two medium and one hard. The HR mentioned that I needed to complete at least 58% to qualify for the next round. After about 1.5 weeks, I was scheduled for a 1-hour 30-minute machine coding round.

For the machine coding round, I was provided with a HackerRank link but also allowed to use my own IDE. I opted for HackerRank, which unfortunately cost me some time dealing with boilerplate code. The main task was to design an order management system for an e-commerce platform. I needed to implement four core functions:

  1. addProduct(productid, quantity)
  2. createOrder(orderid, list of product ids and their corresponding quantities)
  3. confirmOrder(orderid)
  4. getStock(productid)
While the basic implementation seemed straightforward, the interviewer introduced a crucial requirement: inventory should be blocked when createOrder is called, and the stock should only be reduced when confirmOrder is called. This particular detail caused some confusion, and I only partially understood it initially.

The interviewer left and an HR proctored the session, with the interviewer planning to rejoin at the end. I proceeded with my implementation, but for the inventory locking, I initially thought of a cancelOrder function to refill stock if an order was cancelled, reducing inventory at createOrder. The interviewer was not pleased with this approach upon rejoining. After some quick thinking, I came up with an alternative: maintaining two variables for product counts – one for 'fully available' and another for 'not yet confirmed but in order'. I discussed this revised approach and the necessary changes, which seemed to satisfy the interviewer. However, by then, time had run out, and I wasn't able to implement these changes or even run a single test case.

My feedback indicated that the interviewer was happy with my overall Low-Level Design (LLD), but suggested I could improve on clarifying requirements and time management. I believe using my own IDE might have saved considerable time spent manually coding getters, setters, and constructors.

Given that the HR is unresponsive, I suspect the verdict is a rejection.

Interview Questions (2)

Q1
Count Pairs (a^b <= a&b)
Data Structures & AlgorithmsMedium

Given an array, find the number of pairs (a, b) such that a^b <= a&b, where a and b are elements from the array.

Q2
Design E-commerce Order Management System
System Design

Design an order management system for an e-commerce platform. The system should implement the following core functionalities:

  • addProduct(productid, quantity): Adds a product with a specified quantity to the inventory.
  • createOrder(orderid, list of product ids and their corresponding quantities): Creates a new order. Inventory for products in the order should be blocked at this stage.
  • confirmOrder(orderid): Confirms an existing order. The stock for products in the order should be reduced upon confirmation.
  • getStock(productid): Retrieves the current stock level for a given product.
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!