I got online assesment which was in hackerrank and had 3 questions (med, med, hard). I had to complete 58% for getting selected for further round according to HR.
After 1.5 week, HR scheduled machine coding round of 1hr 30mins.
Machine Coding round:
There was hackerrank link, however I was allowed to use my own IDE. I choose hackerrank only but it cost me some time in boilerplate.
Question: Desing order management system for ecommerce.
Basically 4 main functions were to be implemented.
It was quite easy and straightforward question, however interviewer mentioned that we want to block the inventory of a product when createOrder is called, and reduce the stock when confirmOrder is called. I was a bit confused in this and was only able to understand partially. The interviewer left the call and replaced themself with HR for proctoring, saying they will join just before completion of interview. I implemented properly, however for the locking part of inventory, I created cancelOrder function which can be used to cancelOrder and thus at create order the inventory would be reduced, but if cancelOrder is called, it would then again be refilled. The interviewer wasn't happy with the approach so after some thinking, I came with the approach of having two variables being (fully available product count and not yet confirmed but in order product count). I discussed the approach and changes that would be required, the interviewer was happy with my approach but as the time ran out, I was not allowed to make any changes or even run a single test case. Got the feedback that the interviewer was happy with my overall LLD, but I can improve upon clarifying the requirements and time management.
I think this could have been avoided supposed I used my IDE as quite a lot of time went in manually coding getters, setters and constructors.
verdict: Most likely Rejected, as the HR is not picking up the call.