Razorpay Machine Coding | Lead Backend Engineer.
HR approached me for lead backend engineer role in Jan 2026 and mentioned Round 1 to be Machine coding. Gave me a week time for preparation.
Round 1 : Machine Coding . (90mins)
This is going to be AI integrated round. You can take help of AI tools. Interviewer will judge based on AI usage, LLD logic , code quality , etc.
Question
In-memory Search Engine.
Your organization has started a new tech blog with interesting tech stories and you’re responsible for designing and implementing an in-memory search engine, supporting the search functionality on the blog content.
Requirements:
- It should be possible to create a dataset in the search engine.
- It should be possible to insert and delete documents in a given dataset. Each document is simply a piece of text.
- It should be possible to search through documents for a search pattern in a given dataset.
- It should be possible to order the search results
I was able to clarify requirements, come up with solution , code it but during testing my remove document logic was not working properly. By this time, I was already overshooting 90 mins duration. Interview ended. 2 days later, I got the feedback that I got rejected.


