Filter interviews by
I applied via LinkedIn and was interviewed in Nov 2024. There were 2 interview rounds.
1 hour test on hackerrank with 2 coding question and 2 react question on class based component
Top trending discussions
I was interviewed in Jan 2016.
To find the right view of a binary tree, we need to traverse the tree and keep track of the rightmost node at each level.
Traverse the tree using level order traversal
At each level, keep track of the rightmost node
Add the rightmost node to the result array
Return the result array
Find two missing numbers from an unsorted array in O(n) time complexity.
Calculate the sum of all numbers from 1 to n using the formula n*(n+1)/2
Calculate the sum of all numbers in the given array
Subtract the sum of array from the sum of all numbers to get the sum of missing numbers
Use the sum of missing numbers and the sum of squares of all numbers from 1 to n to calculate the missing numbers using simultaneous equatio
To find average salary without disclosing any one salary
Collect salaries of all employees
Add all salaries and divide by total number of employees
Do not disclose any individual salary
Divide a golden brick into minimum parts to pay daily salary to a worker.
The number of parts needed will depend on the daily salary of the worker.
The size of the parts should be equal.
The parts should be small enough to cover the daily salary but large enough to minimize the number of parts.
The formula to calculate the number of parts is: number of parts = total value of the golden brick / daily salary
I applied via Campus Placement and was interviewed before Oct 2019. There were 4 interview rounds.
Twitter system design involves multiple components such as servers, databases, caching, and APIs.
Use sharding to distribute data across multiple servers
Implement caching to reduce database load
Use message queues for handling high traffic
Implement APIs for user authentication and data retrieval
Use load balancers to distribute traffic evenly
Implement a search engine for efficient search functionality
The minimum number of platforms needed to avoid train crashes based on arrival and departure times.
Sort the arrival and departure arrays in ascending order.
Initialize a variable to keep track of the maximum number of platforms needed.
Iterate through the arrival and departure arrays simultaneously.
If the current arrival time is less than or equal to the current departure time, increment the platform count.
If the current...
I was interviewed 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)
2 questions in 60 minutes
I applied via Campus Placement and was interviewed before Jul 2023. There was 1 interview round.
3-sum leetcode, 4 sum leetcode, react
I applied via Campus Placement
90 mins, easy, Data structures and algorithm basics
Remove duplicates from array of strings in place
Use a HashSet to keep track of unique elements
Iterate through the array and remove duplicates by checking if element is already in the HashSet
Update the array in place by shifting elements to fill in the removed duplicates
Caching is the process of storing data in a temporary location to reduce access time and improve performance.
Caching helps reduce the load on servers by serving frequently accessed data quickly
It can improve performance by reducing the time needed to retrieve data from the original source
Examples include browser caching, CDN caching, and database caching
An immutable class is a class whose instances cannot be modified after creation.
Use final keyword for class declaration to prevent inheritance
Make all fields private and final to prevent modification
Do not provide setter methods, only getter methods should be used
Implement a Springboot service to intercept HTTP requests.
Create a Springboot application with necessary dependencies.
Implement a custom interceptor by extending HandlerInterceptorAdapter.
Override preHandle and postHandle methods to intercept requests and responses.
Register the interceptor in the WebMvcConfigurerAdapter configuration class.
LRU cache is a data structure that stores the most recently used items, discarding the least recently used items when full.
Use a doubly linked list to keep track of the order of items based on their usage.
Use a hash map to quickly access items in the cache.
When a new item is accessed, move it to the front of the linked list. If the cache is full, remove the item at the end of the list.
HashMap is a data structure that stores key-value pairs and allows for fast retrieval of values based on keys.
HashMap is implemented using an array of linked lists or a balanced tree to handle collisions.
It uses a hash function to map keys to indices in the array.
Example: HashMap
based on 1 interview
Interview experience
Operations Analyst
498
salaries
| ₹0 L/yr - ₹0 L/yr |
Relationship Manager
253
salaries
| ₹0 L/yr - ₹0 L/yr |
Team Lead
195
salaries
| ₹0 L/yr - ₹0 L/yr |
CAR Consultant
161
salaries
| ₹0 L/yr - ₹0 L/yr |
Assistant Manager
132
salaries
| ₹0 L/yr - ₹0 L/yr |
Truebil
CarDekho Group
Carwale
Cartrade.com