TESCO

Posted
4 Aug 2026
90 reads

Summary

I attended a first round interview at Tesco, which included introductions, discussion of my project and a coding problem about searching products by keyword.

How it went

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.

Questions asked (1)

  1. 01

    Product Search by Keyword

    Data Structures & Algorithms

    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 list of products represented as pairs of [id, name], implement a function that returns all products whose name contains a given search string (case‑insensitive). For example:

    Products = [ {1, "Amul milk"}, {2, "Nandini Chocolate Milk"}, {3, "Milk Chocolate"}, {4, "Chocolate Milk"}, {5, "Milky Way Chocolate Bar"} ]

    Search string = "Milk" should return: [{1, "Amul milk"}, {2, "Nandini Chocolate Milk"}, {3, "Milk Chocolate"}, {4, "Chocolate Milk"}]

    Search string = "Chocolate Milk" should return: [{2, "Nandini Chocolate Milk"}, {3, "Milk Chocolate"}, {4, "Chocolate Milk"}]

    The solution should handle all happy scenarios and edge cases.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Tesco recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!