For phonePe SDE-2 interviews, Machine coding round is initial round for screening. Here, one low level design question is asked and that needs to be solved in duration of 2 hours. The solution developed must be correct, satisfying all mentioned requirements, applying object oriented design principles and running code needs to be submitted at end of interview.
I was asked to develop a message queueing system. Functional requirements of this system has been described below in detail.
All Object oriented design principles must be followed and requirements should be fulfilled. Design should be flexible and scalable.
Apart from this, on same day, one more interview of length 20 minutes was conducted to discuss the solution developed and analyse all the test cases for this system.
I am not very sure what went wrong while developing this solution. Already applied observer pattern to solve pub-sub registration/de-registration. Please let me know your solutions in comment section.
My solution github link : https://github.com/shecodes29/Design-interviews/tree/master/PubSubSystem
I am open to any review comments and further enhancements in design. Thanks.