i
Tata 1mg
Filter interviews by
I applied via Referral and was interviewed in Aug 2024. There was 1 interview round.
I was asked question on sliding window on finding the largest subarray with all distinct numbers. The interviewer was very helpful.
I appeared for an interview before Apr 2021.
Round duration - 45 Minutes
Round difficulty - Medium
It was in the mid day and since I applied for a Frontend role the discussion was majorly around data structure and bit of Javascript.
The interviewer was helping and good listener.
You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.
...Merge two sorted linked lists into a single sorted linked list without using additional space.
Create a dummy node to start the merged list
Compare the values of the two linked lists and add the smaller value to the merged list
Move the pointer of the merged list and the pointer of the smaller value list
Continue this process until one of the lists is fully traversed
Append the remaining elements of the other list to the me
Given an integer array arr
of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array.
The first line contains an integer 'T' representing the n...
Sort an array of 0s, 1s, and 2s in linear time complexity.
Use three pointers to keep track of 0s, 1s, and 2s while traversing the array.
Swap elements based on the values encountered to sort the array in-place.
Time complexity should be O(N) and space complexity should be O(1).
Round duration - 60 Minutes
Round difficulty - Medium
It was more of a in depth round on the framework I'm working on and problem solving.
The event loop is a mechanism in programming that allows for asynchronous execution of code.
The event loop is a key component in JavaScript's runtime environment, responsible for handling asynchronous operations.
It continuously checks the call stack for any pending tasks and executes them in a non-blocking manner.
The event loop ensures that the program remains responsive by allowing other code to run while waiting for ...
Output-based questions in JavaScript using browser APIs
Example 1: Write a script that uses the Geolocation API to display the user's current location on a map
Example 2: Create a program that uses the Web Audio API to play a sound when a button is clicked
Example 3: Develop a web page that uses the Canvas API to draw a simple animation
Designing a system to support localization in a mobile app
Use resource files to store localized strings for different languages
Implement a language selection feature for users to choose their preferred language
Utilize localization libraries or frameworks to streamline the process
Consider cultural differences when localizing content, such as date formats and currency symbols
Round duration - 75 Minutes
Round difficulty - Hard
It was more of a fitment/managerial round.
Didn't had any coding questions, but was asked more on approaches and optimisations.
Discussions on the project you have worked on.
To find the fastest 3 horses out of a group with 5 horses racing at a time, we can use a tournament style approach.
Divide the horses into groups of 5 and race them against each other. This will give you the fastest horse in each group.
Take the winners from each group and race them against each other. The top 3 horses in this final race will be the fastest 3 overall.
Keep track of the results and compare the timings to d
To debug lag on a screen, analyze code, check for memory leaks, optimize rendering, and use profiling tools.
Analyze code to identify any inefficient algorithms or operations causing lag.
Check for memory leaks that could be impacting performance.
Optimize rendering by reducing the number of draw calls, optimizing shaders, and minimizing overdraw.
Use profiling tools like Xcode Instruments or Android Profiler to identify p
The app I recently worked on is a social media platform for sharing photos and connecting with friends.
The app follows a client-server architecture, with the client being the mobile app and the server handling data storage and processing.
The client side is built using React Native for cross-platform compatibility.
The server side is implemented using Node.js with a MongoDB database for storing user data and photos.
The a...
Tip 1 : Get your JS fundamentals right (if applying for a Frontend role, https://javascript.info/ is a good start)
Tip 2 : Apart from preparing data structures, practise on the communication skills as well (prepare your introduction, be a good listener and on spot improvisation plays key roles)
Tip 1 : highlight projects related to the job profile in your resume and mention what was your contribution in them precisely in 1/2 lines.
Tip 2 : Include URLs to applications/projects that you have build and your achievements/blog (if any)
I appeared for an interview in Feb 2025.
Data Structures, Coding MCQs
Data structures are organized formats for storing, managing, and accessing data efficiently.
1. Types: Common data structures include arrays, linked lists, stacks, queues, trees, and graphs.
2. Arrays: Fixed-size collections of elements, e.g., [1, 2, 3, 4].
3. Linked Lists: Collections of nodes where each node points to the next, e.g., 1 -> 2 -> 3.
4. Stacks: Last-in, first-out (LIFO) structures, e.g., function call ...
Depth-First Search (DFS) is a graph traversal algorithm that explores as far as possible along each branch before backtracking.
DFS uses a stack data structure, either explicitly or via recursion.
It starts from a selected node and explores each branch before backtracking.
Example: In a binary tree, DFS can be implemented using pre-order, in-order, or post-order traversal.
DFS can be used to find connected components in a ...
I applied via Instahyre and was interviewed in Nov 2024. There were 2 interview rounds.
Easy to medium questions, Questions on DSA and Node.js.
I appeared for an interview in Oct 2020.
Round duration - 90 minutes
Round difficulty - Medium
The test was conducted in the evening from 5:00 pm to 6:30 pm. Because of the covid situation, all the students attempted the test from their homes. But it was a webcam-based test to avoid any kind of cheating.
There were 3 coding problems to be done in 90 minutes.
After resume based shortlisting, 70 candidates were selected to appear for the test out of which 30 were shortlisted for interviews.
Determine if the third string contains all the characters from both the first and second strings in any order. If so, return "YES"; otherwise, return "NO".
Line ...
Check if the third string contains all characters from the first and second strings in any order.
Create a frequency map for characters in the first and second strings.
Check if all characters in the third string are present in the frequency map.
Ensure the count of characters in the third string matches the count in the frequency map.
Return 'YES' if all conditions are met, otherwise return 'NO'.
You are given a connected undirected unweighted graph comprising 'N' nodes and 'M' edges. In this graph, each pair of connected nodes is linked by exactly one undirected e...
Find the length of the shortest path visiting all nodes in a connected undirected unweighted graph.
Use Breadth First Search (BFS) to find the shortest path that visits all nodes at least once.
Maintain a bitmask to keep track of visited nodes and their states.
Consider all possible permutations of nodes to find the shortest path length.
Stark Industry is planning to organize meetings for various departments in preparation for Stark Expo. Due to limited rooms in Stark Tower, the goal is to alloca...
Determine the minimum number of conference rooms required for scheduling meetings.
Sort the meetings by start time.
Iterate through the meetings and keep track of rooms needed based on overlapping times.
Use a priority queue to efficiently allocate rooms.
Example: For meetings (1pm-4pm), (3pm-5pm), (4pm-6pm), 2 rooms are required.
Ensure linear time complexity by optimizing the room allocation process.
Round duration - 50 minutes
Round difficulty - Medium
This round started at 9 am and went till 4 pm.
Out of 70 students that appeared in online coding test, 30 were shortlisted for the first round (this round) of interviews.
In this round, everyone was asked one moderate level coding question. The interviewer provided the link to an IDE, where I wrote my code.
The interview started with the introduction being followed by 1 coding problem. In the end, the interviewer asked me if I wanted to ask any questions. To which I asked him my feedback so that I can improve my wear areas.
Of the 30 candidates, 17 were selected for the final interview round.
Given an array arr
containing 'N' distinct integers, your task is to generate all possible non-empty subsets of this array.
Note: While the elements within each subset should ...
Generate all possible non-empty subsets of an array of distinct integers.
Use recursion to generate all subsets by including or excluding each element in the array.
Maintain a current subset and add it to the result when reaching the end of the array.
Ensure elements within each subset are in increasing order.
Handle the input and output format as specified in the question.
Round duration - 50 minutes
Round difficulty - Easy
This was a technical + HR round. Started in the evening at 4:30 pm, this round went till 9:30 pm.
17 students were shortlisted for this final round of interview.
This interview was also virtual and involved both technical and HR-related questions. The interview started with an introduction and then questions based on my resume were asked.
Out of 17 candidates, 8 candidates got a full-time offer from Urban Company.
You are provided with a 2D matrix containing only the integers 0 or 1. The matrix has dimensions N x M, and each row is sorted in non-decreasing order. Your...
Find the row with the maximum number of 1's in a sorted 2D matrix.
Iterate through each row of the matrix and count the number of 1's in each row.
Keep track of the row index with the maximum number of 1's seen so far.
Return the index of the row with the maximum number of 1's.
If multiple rows have the same number of 1's, return the row with the smallest index.
Tip 1 : Coding Problems are asked from DSA, so a good practice of standard problems is a must. Revisit these problems before the interview to ace and crack the interview.
Tip 2 : To tackle the conceptual questions, you need to have thorough knowledge about the concepts, so to prepare for OS and DBMS, read one standard book.
Tip 3 : Have proper and clear knowledge about your project. Basic but tricky questions are asked based on the internship experience and the projects you have done.
Tip 1 : The best way to ace an interview is to take command of your interview in your hands. And this is done by having a balanced resume. Projects give direction to the interview and increase the probability of selection. So add at least 2 projects.
Tip 2 : Urban Company seeks team players and not just good coders. So add your achievements outside the academics to get shortlisted.
I appeared for an interview in Oct 2020.
Round duration - 75 minutes
Round difficulty - Medium
The test had 3 questions which had to solved in 75 minutes.The test was of medium difficulty.
Stark Industry is planning to organize meetings for various departments in preparation for Stark Expo. Due to limited rooms in Stark Tower, the goal is to alloca...
Determine the minimum number of conference rooms needed to schedule meetings without overlap.
Sort the meetings by start time.
Iterate through the meetings and keep track of the rooms in use.
If a meeting starts after another ends, it can reuse the same room.
If a meeting starts before another ends, a new room is needed.
Return the maximum number of rooms in use at any point.
You are provided with an integer X
and are tasked with identifying an integer Y
such that the bitwise XOR operation between X
and Y
yields the maximum possible value. The condition is t...
Find an integer Y such that XOR operation with X yields maximum value within given constraints.
Iterate from the most significant bit to find the highest bit that can be toggled to maximize XOR value.
To maximize XOR value, toggle the highest bit of X to 0 and all lower bits to 1.
Ensure the final Y does not exceed (2^61) - 1.
Example: For X = 3, the highest bit to toggle is at position 61, so Y = 2305843009213693950.
Examp...
You are provided with a non-decreasing array and an integer K. Your task is to remove exactly K elements from this array so that the maximum differenc...
Remove K elements from a non-decreasing array to minimize the maximum difference between adjacent elements.
Sort the array in non-decreasing order.
Iterate through the array and calculate the difference between adjacent elements.
Remove elements to minimize the maximum difference.
Return the minimized maximum difference.
Round duration - 60 minutes
Round difficulty - Easy
The interview was taken by SDE2 and she was very friendly. All the questions asked were related to DS and algo. The first 10 minutes were used for introductions and the last 5 minutes were reserved for any questions that I have. Always try to ask meaningful questions at the end of the interview.
Given a sorted array ARR
and a number X
, your task is to determine the count of occurrences of X
within ARR
.
X
is not found in the array, return...Count occurrences of a number in a sorted array efficiently.
Use binary search to find the first and last occurrence of the target number in the array.
Calculate the count of occurrences by subtracting the indices of the last and first occurrences.
Handle cases where the target number is not found in the array.
Time complexity: O(log(N)), Space complexity: O(1).
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find the minimum time required to rot all fresh oranges in a grid.
Use Breadth First Search (BFS) to simulate the rotting process
Track the time taken to rot all oranges and return -1 if any fresh oranges remain
Handle edge cases such as no fresh oranges or all oranges already rotten
Consider using a queue to efficiently process neighboring oranges
Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or ...
Yes, the cloning of a linked list with random pointer can be accomplished without utilizing extra space.
Use a hashmap to store the mapping between original nodes and cloned nodes.
Iterate through the original linked list to create the cloned linked list by mapping the random pointers using the hashmap.
Time complexity of this approach is O(N) where N is the number of nodes in the linked list.
Round duration - 60 minutes
Round difficulty - Medium
The focus of this round was mainly on my projects and internships. It was taken by a Senior SDE and it more of a technical interaction. I was asked in-depth about my projects and most of the questions asked around OS/DBMS were based on my projects.
The interviewer wanted to judge whether I have core knowledge about subjects like OS and DBMS and also about the projects that I had done.
Round duration - 60 minutes
Round difficulty - Easy
It was the culture fit round taken by the Director of Engineering.
Tip 1 : Learn the concepts, not the solutions.
Tip 2 : You should have deep knowledge about the projects mentioned in your resume.
Tip 1 : Resume should be only 1 page.
Tip 2 : Try to tell a story through your resume. For eg - always mention the impact or scale of your projects/internship.
Implement a solution to find the maximum profit from buying and selling stocks with at most 2 transactions.
Use dynamic programming to keep track of maximum profit at each day with 0, 1, or 2 transactions.
Consider the possibility of splitting the transactions into two separate parts.
Calculate the maximum profit by iterating through the prices array and updating the maximum profit accordingly.
Binary search is a divide and conquer algorithm that efficiently finds a target value in a sorted array.
Divide the array in half and compare the target value with the middle element
If the target is less than the middle element, search the left half. If greater, search the right half
Repeat the process until the target is found or the subarray is empty
Design a digital wallet system similar to Paytm.
Allow users to add money to their wallet using various payment methods like credit/debit cards, net banking, UPI, etc.
Enable users to make payments for various services like mobile recharge, bill payments, online shopping, etc.
Implement security measures like two-factor authentication, encryption of sensitive data, and regular security audits.
Provide features like transac...
A thread is a lightweight process that can run concurrently with other threads within the same process.
Threads allow for parallel execution of tasks within a single process.
Threads share the same memory space and resources of the process they belong to.
Threads can communicate with each other through shared memory or message passing.
Examples: Java threads, POSIX threads (pthreads) in C/C++.
I applied via Campus Placement and was interviewed in Sep 2023. There were 3 interview rounds.
Seat reservation system
bit manipulation
binary tree related
based on 1 interview
Interview experience
based on 5 reviews
Rating in categories
Team Lead
264
salaries
| ₹1.8 L/yr - ₹8 L/yr |
Senior Executive
257
salaries
| ₹2.2 L/yr - ₹6.5 L/yr |
Pharmacist
239
salaries
| ₹1.7 L/yr - ₹4.5 L/yr |
Assistant Manager
184
salaries
| ₹4 L/yr - ₹13 L/yr |
Executive
141
salaries
| ₹1.6 L/yr - ₹5.5 L/yr |
PharmEasy
Udaan
Swiggy
CARS24