MakeMyTrip
100+ Ampcus Tech Interview Questions and Answers
Q101. Design Gmail system design
Design a system similar to Gmail for sending and receiving emails.
Use distributed systems for scalability and reliability
Implement features like search, filters, labels, and attachments
Utilize a database for storing emails and user data
Include security measures like encryption and authentication
Q102. Design a singleton class
A singleton class is a class that can only have one instance created throughout the application.
Ensure the constructor is private to prevent external instantiation.
Provide a static method to access the single instance.
Use lazy initialization to create the instance only when needed.
Q103. MICROSERVICE VS MONOLITH
Microservices are small, independent services that work together, while monolith is a single, large application.
Microservices are loosely coupled and can be developed, deployed, and scaled independently.
Monoliths are tightly coupled and any change requires redeployment of the entire application.
Microservices allow for better fault isolation and scalability.
Monoliths are simpler to develop and deploy initially.
Examples of microservices include Netflix, Amazon, and Uber.
Example...read more
Q104. Pyspark? Coalesce vs reparation?
Coalesce and repartition are both methods used in Pyspark for reducing the number of partitions in a DataFrame.
Coalesce is used to reduce the number of partitions without shuffling the data, while repartition involves shuffling the data to create a specified number of partitions.
Coalesce is more efficient when reducing the number of partitions, as it avoids shuffling the data unnecessarily.
Repartition is useful when you need to increase the number of partitions or redistribut...read more
Q105. Design Spotify in depth
Spotify is a music streaming service that allows users to listen to a wide variety of songs and create personalized playlists.
Spotify uses algorithms to recommend music based on user preferences and listening history.
Users can create playlists, follow artists, and share music with friends.
Spotify offers both free and premium subscription options with additional features like offline listening and ad-free music.
The platform also includes social features like collaborative play...read more
Q106. LPS array in string
LPS array in string refers to the Longest Palindromic Substring array in a given string.
Create an array to store all the palindromic substrings found in the given string.
Iterate through the string and check for palindromic substrings of different lengths.
Store the longest palindromic substrings in the array.
Q107. DBMS, how to use sql
DBMS is a software that manages databases, SQL is a language used to interact with databases.
SQL stands for Structured Query Language
SQL is used to retrieve, update, and manage data in a database
Basic SQL commands include SELECT, INSERT, UPDATE, DELETE
Example: SELECT * FROM table_name WHERE condition;
Q108. Train water trapping problem
Train water trapping problem involves calculating the amount of water that can be trapped between blocks.
Calculate the maximum height of blocks on left and right of each block
Find the minimum of the two heights and subtract the height of the current block to get trapped water
Sum up the trapped water for all blocks to get total trapped water
Q109. split person name in excel
Use Excel's text to columns feature to split person names into separate columns.
Select the column containing the full names
Go to the Data tab and click on Text to Columns
Choose 'Delimited' and select the delimiter that separates the names (e.g. space)
Click Finish to split the names into separate columns
Q110. Implement LRU Cache
LRU Cache is a data structure that stores the most recently used items and discards the least recently used items when full.
Use a combination of a doubly linked list and a hashmap to implement LRU Cache.
Keep track of the most recently used item at the head of the linked list and the least recently used item at the tail.
When a new item is accessed, move it to the head of the linked list and update the hashmap.
When the cache is full, remove the tail item from the linked list an...read more
Q111. Product of array except self
Calculate the product of all elements in an array except for the current element.
Iterate through the array and calculate the product of all elements except the current element.
Use two loops to calculate the product of elements before and after the current element.
Handle edge cases like 0s in the array to avoid division by zero errors.
Q112. Rotten orange problem
The rotten orange problem involves determining the minimum number of minutes it takes for all oranges to become rotten.
Use a breadth-first search (BFS) algorithm to solve the problem
Create a queue to store the coordinates of rotten oranges
Iterate through the grid and enqueue all rotten oranges
While the queue is not empty, dequeue an orange and check its neighboring oranges
If a neighboring orange is fresh, make it rotten and enqueue its coordinates
Keep track of the minutes pas...read more
Q113. Favourite App critique
My favorite app is Instagram, but I believe it can improve its algorithm for showing posts.
Instagram's algorithm sometimes shows posts out of order, leading to missed content
The explore page could be more personalized based on user interests
There are concerns about the impact of the app on mental health due to the focus on likes and followers
Q114. Design of Split Wise
Split Wise is a mobile app that helps friends and roommates split bills and expenses.
Allows users to create groups and add expenses
Calculates each user's share of the expenses
Provides options for settling debts within the group
Sends notifications for pending payments
Supports multiple currencies for international users
Top HR Questions asked in Ampcus Tech
Interview Process at Ampcus Tech
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month