TESCO

Anonymous User
806
Aug 04, 2026
Aug 04, 2026

Hi Everyone -

Tesco Round 1 Question -

  1. Introduce yourself
  2. Project + Role and Responsibility + Code Review
  3. 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.

Comments (4)