Add office photos
Employer?
Claim Account for FREE

PayPal

3.9
based on 894 Reviews
Filter interviews by

BigBasket Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Input a file. Select first 3 lines of the file. Select the longest line and count the number of words in that line. It was easy. I used Java methods to solve the problem. I explained the logic and he accepted i...

read more
Ans.

The program reads a file and selects the first 3 lines. It then identifies the longest line and counts the number of words in that line.

  • Read the file using appropriate file handling methods

  • Store the first 3 lines in an array of strings

  • Iterate through the array to find the longest line

  • Count the number of words in the longest line using string manipulation methods

Add your answer

Q2. But amazon can do the search in O(n). Why it has to go for O(nk)? For data structures like Hash tables and for large data, n will be large. So O(nk) is better than O(n) (former n is smaller than latter n).

Ans.

O(nk) is better than O(n) for large data and hash tables.

  • O(nk) is better because it takes into account the size of the data and the number of keys.

  • For large data and hash tables, the size of n will be large, making O(nk) more efficient.

  • O(n) assumes a constant number of keys, which may not be the case in practice.

  • Amazon may have chosen O(nk) for better scalability and performance.

Add your answer

Q3. When you search for a particular product in amazon, it displays some of the search results. But, only few particular products which are available in amazon are displayed, not all. How does this happen? I told M...

read more
Ans.

Amazon displays only a subset of search results based on various factors like relevance, popularity, and user preferences.

  • Amazon uses algorithms to determine which products to display in search results.

  • Factors considered include product relevance, customer reviews, sales rank, and availability.

  • Machine learning techniques may be used to personalize search results based on user behavior and preferences.

  • Amazon also considers factors like seller reputation and fulfillment options...read more

Add your answer

Q4. There exists a 3x3 matrix, start from the first element reach the last element of the matrix, between each edges there exists a weight. Reach the destination such that the sum of weights should be small. It was...

read more
Ans.

The question is about finding the shortest path in a 3x3 matrix with weighted edges.

  • This is a graph traversal problem.

  • Use a graph algorithm like Dijkstra's algorithm or A* search to find the shortest path.

  • Assign weights to the edges and calculate the sum of weights for each possible path.

  • Choose the path with the smallest sum of weights as the shortest path.

Add your answer
Discover BigBasket interview dos and don'ts from real experiences

Q5. What will be the key and what will be the values? The product will be the key. The brands will be the values.

Ans.

The product will be the key and the brands will be the values.

  • The key in this case refers to the unique identifier for each product.

  • The values are the different brands associated with each product.

  • For example, if the product is a smartphone, the key could be the model number and the values could be the different brands that manufacture that model.

Add your answer

Q6. Do you know Radix Sort? Where it is used? Radix sort can be applied in amazon.

Ans.

Radix sort is a sorting algorithm that sorts integers by processing individual digits from least significant to most significant.

  • Radix sort is a non-comparative sorting algorithm.

  • It sorts numbers by grouping them based on each digit's value.

  • It is commonly used for sorting strings in lexicographic order.

  • Radix sort has linear time complexity, making it efficient for large datasets.

View 1 answer

Q7. What data structure do they use? Hash tables.

Ans.

Hash tables are a data structure that uses a hash function to map keys to values, providing efficient lookup, insertion, and deletion.

  • Hash tables use a hash function to convert keys into array indices.

  • They provide constant-time average case complexity for search, insert, and delete operations.

  • Collisions can occur when different keys map to the same index, which can be resolved using techniques like chaining or open addressing.

  • Examples of hash table implementations include Pyt...read more

Add your answer

Q8. Application of Fibonacci series in day-to-day life.

Ans.

The Fibonacci series can be applied in day-to-day life for various purposes.

  • Financial planning: Fibonacci numbers can be used to calculate investment growth and determine optimal investment strategies.

  • Architecture and design: Fibonacci ratios can be used to create aesthetically pleasing designs and layouts.

  • Nature and biology: Fibonacci patterns can be observed in the growth of plants, arrangement of leaves, and formation of shells.

  • Music and art: Fibonacci sequences can be use...read more

Add your answer

Q9. Running time of Radix sort? O(nk)

Ans.

Radix sort has a running time of O(nk), where n is the number of elements and k is the length of the longest element.

  • Radix sort is a non-comparative sorting algorithm that sorts elements by their individual digits or characters.

  • It works by distributing the elements into 10 buckets based on the value of the least significant digit, then repeatedly redistributing them based on the next significant digit.

  • The process continues until all digits have been considered, resulting in a...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at BigBasket

based on 2 interviews
Interview experience
4.5
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter