Panda Guru LogoPanda
Guru

Razorpay | SSE | Round -1 | LLD

Round 1

Questions: 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:

// Java code provided in the post

Test Cases:

------ TEST CASE - 1 ------ searchService.searchBlog("AI") ------ TEST CASE - 2 ------ searchService.searchBlog("AI EVERYWHERE ") ------ TEST CASE - 3 ------ searchService.searchBlog("AI EVERYWHERE ") ------ TEST CASE - 4 ------ searchService.searchBlog("AI IS ") ------ TEST CASE - 5 ------ searchService.searchBlog("MGRS") ------ TEST CASE - 6 ------ searchService.searchBlog("MGRS") ------ TEST CASE - 7 ------ searchService.searchBlog("AI")
Candidate's Approach

The candidate designed an in-memory search engine using Java, implementing functionalities to create datasets, insert and delete documents, and search through the documents. The approach included using a singleton pattern for the blog repository, an observer pattern for notifying changes in the blog service, and a strategy pattern for sorting search results. The candidate also provided test cases to validate the implementation.

Interviewer's Feedback

No feedback provided.