Hi Everyone -
Tesco Round 1 Question -
- Introduce yourself
- Project + Role and Responsibility + Code Review
- Program
/*Enabling efficient search in online is very crucial for enabling the customer to find the product from a huge
set of product collection. Finding relevant product is crucial for increasing hit ratio of the search.
Given a bunch of products[id,Name] as below , if a customer searches for the product by entering
keywords say (“milk”)
Example:
Products : [
{1, “Amul milk”},
{2, “Nandini Chocolate Milk”},
{3, “Milk Chocolate”},
{4, “Chocolate Milk”},
{5, "Milky Way Chocolate Bar"}]
return all the products [id and name] that contain that search string.
For example search for “Milk” should return :
Products : [
{1, “Amul milk”},
{2, “Nandini Chocolate Milk”},
{3, “Milk Chocolate”}, {4, “Chocolate Milk”}]
Similarly, search for “Chocolate Milk” : [
{2, “Nandini Chocolate Milk”},
{3, “Milk Chocolate”},
{4, “Chocolate Milk”}]*/
Expectation - working all happy scenerio plus edge case.


