Filter interviews by
Storing cookies on the client system allows for personalized user experiences and reduces server load.
Storing cookies on the client system allows for faster access to user data without the need to constantly query the server.
Cookies can store user preferences and login information, making the browsing experience more personalized.
Server-side storage of cookies would require more server resources and could slow down the...
I am a highly motivated and experienced professional with a strong background in project management and team leadership.
Over 10 years of experience in managing complex projects and leading cross-functional teams.
Proven track record of delivering projects on time and within budget.
Expertise in strategic planning, risk management, and stakeholder communication.
Strong problem-solving and decision-making skills.
Excellent c...
Threads provide a lightweight way to achieve multitasking within a process.
Threads share the same memory space, while processes have separate memory spaces.
Threads are faster to create and terminate compared to processes.
Threads allow for efficient communication and synchronization between different parts of a program.
Threads are commonly used in applications that require concurrent execution, such as web servers or mu...
Threads allow for more efficient use of resources and better performance compared to running concurrent processes.
Threads are lighter weight than processes, requiring less overhead to create and manage.
Threads share the same memory space, allowing for easier communication and data sharing between threads.
Threads are more efficient for tasks that require frequent communication or synchronization.
Threads are commonly use...
The value of x will depend on the execution order of the threads.
The function fun() increments the value of x by 1.
If all three threads run the function concurrently, the final value of x will be 8.
If the threads run sequentially, the final value of x will be 7.
The virtual keyword is used in object-oriented programming to indicate that a method or property can be overridden in a derived class.
The virtual keyword allows for polymorphism, where a derived class can provide its own implementation of a method or property inherited from a base class.
It enables the concept of dynamic dispatch, where the appropriate method implementation is determined at runtime based on the actual t...
No, we cannot implement overloading using different return types of function.
Overloading is based on the number and types of parameters, not the return type.
If we have two functions with the same name and parameters but different return types, it will result in a compilation error.
Return type alone is not sufficient to differentiate between overloaded functions.
Overriding is a concept in object-oriented programming where a subclass provides a specific implementation of a method that is already provided by its superclass.
Overriding allows a subclass to provide a specific implementation of a method that is already defined in its superclass.
It is used to achieve runtime polymorphism in object-oriented programming.
The method in the subclass must have the same name, return type, a...
Sliding window protocol is a technique used in computer networks to ensure reliable and efficient data transmission.
Sliding window protocol is used to manage the flow of data between sender and receiver in a network.
It divides the data into small packets and assigns a sequence number to each packet.
The sender sends a fixed number of packets and waits for acknowledgment from the receiver before sending more packets.
If a...
I was interviewed before May 2021.
Round duration - 45 minutes
Round difficulty - Medium
This was a technical round.
You are provided with an array or list called ARR
, consisting of N
integers. These integers fall within the range from 0 to N - 1. Some elements in this array may appear more t...
Identify duplicate elements in an array of integers within the range from 0 to N - 1.
Iterate through the array and keep track of seen elements using a hash set.
If an element is already in the set, it is a duplicate and can be added to the result.
Return the list of duplicate elements found in the array.
Example: For input [1, 3, 1, 3, 4], output should be ['1', '3'].
Given an array ARR
consisting of N
integers, your task is to identify all distinct triplets within the array that sum up to a given integer K
.
The task is to find all distinct triplets in an array that sum up to a given integer.
Iterate through the array and use a nested loop to find all possible triplets.
Use a set to store unique triplets and avoid duplicates.
Check if the sum of the triplet equals the target sum.
Return the list of valid triplets or -1 if no such triplet exists.
Round duration - 45 minutes
Round difficulty - Medium
This was a technical interview round with questions on Programming and algorithms.
Consider you are provided with 'n' different types of rectangular 3D boxes. For each type of box, you have three separate arrays: height
, width
, and length
that define the d...
The task is to stack different types of rectangular 3D boxes to achieve the maximum possible height.
Iterate through all possible rotations of each box type.
Sort the boxes based on their base dimensions in non-increasing order.
Use dynamic programming to find the maximum height achievable by stacking the boxes.
Consider the constraints while implementing the solution.
Example: For input [3, [4, 1, 4], [6, 2, 5], [7, 3, 6]]
Given an array of integers, find the maximum sum of any contiguous subarray within the array.
array = [34, -50, 42, 14, -5, 86]
137
Find the maximum sum of any contiguous subarray within an array in O(N) time complexity.
Use Kadane's algorithm to find the maximum sum subarray in O(N) time complexity
Initialize two variables: max_sum and current_sum to track the maximum sum subarray
Iterate through the array and update current_sum by adding the current element or starting a new subarray
Update max_sum if current_sum becomes greater than max_sum
Round duration - 50 minutes
Round difficulty - Medium
This was a difficult on to face as we have to hold phone and concentrate and explaining is also very difficult.
Given an array/list 'prices' where the elements represent yesterday's stock prices at each minute, determine the maximum profit possible from a single buy and sell act...
Given an array of stock prices, find the maximum profit from a single buy and sell action.
Iterate through the array and keep track of the minimum price seen so far and the maximum profit achievable.
Calculate the profit by subtracting the current price from the minimum price seen so far.
If the profit is negative, set it to 0 as we can't sell without buying first.
Given an undirected graph with 'V' vertices (labeled 0, 1, ..., V-1) and 'E' edges, where each edge connects two nodes ('X', 'Y') and has a weight that denotes the di...
Dijkstra's algorithm is used to find the shortest path distance from a source node to all other nodes in a graph.
Implement Dijkstra's algorithm to find the shortest path distances from node 0 to all other nodes in the graph.
Use a priority queue to efficiently select the next node with the shortest distance.
Initialize distances to all nodes as infinity except for the source node which is 0.
Update distances to neighborin...
Round duration - 30 minutes
Round difficulty - Easy
This was a small interaction just to make us familiar in Mumbai office.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I was interviewed in Aug 2017.
Directi interview questions for popular designations
Given a string and pairs of indices, output the lexicographically smallest string after swapping characters.
Sort the pairs based on the first index in ascending order.
Use union-find data structure to keep track of connected components.
Swap characters in the string based on the connected components.
Return the lexicographically smallest string.
Output all edges in any shortest path from x to y in an undirected weighted graph
Use Dijkstra's algorithm to find all shortest paths from x to y
Store the predecessor of each vertex to reconstruct the paths
Output all edges in any of the shortest paths found
The angle between the hour hand and minute hand of a clock can be calculated using a simple formula.
The angle between the hour hand and minute hand is given by the formula: |(30H - 11/2) - 6M| degrees
H is the hour hand position and M is the minute hand position
If the result is greater than 180 degrees, subtract it from 360 degrees to get the acute angle
To find the country of an IP address from a CSV file, we can use a lookup table based on the IP address range.
Create a lookup table from the CSV file with IP address ranges and corresponding country codes
Parse the given IP address and match it with the ranges in the lookup table to find the corresponding country code
Use binary search for efficient lookup in the IP address ranges
Handle cases where the given IP address f
To detect a loop in a linked list, we can use Floyd's Cycle Detection Algorithm.
Use two pointers, one moving at twice the speed of the other
If there is a loop, the two pointers will eventually meet at some point
Alternatively, use a hash set to store visited nodes and check for duplicates
I was interviewed before Mar 2016.
I was attracted to this company because of its strong reputation in the industry and its commitment to innovation.
The company has a proven track record of success and is highly regarded in the market.
I was impressed by the company's focus on staying ahead of industry trends and constantly seeking new ways to improve.
The company's values and mission align with my own professional goals and aspirations.
I was excited abou...
The key points of marketing that fascinated me were its creativity, strategic thinking, and impact on consumer behavior.
Creativity in developing unique campaigns and messaging to attract customers
Strategic thinking in analyzing market trends and competition to create effective marketing strategies
Impact on consumer behavior by influencing purchasing decisions through targeted marketing efforts
The glasses are stacked like a pyramid on a table. Each glass can hold a certain amount of water, and the overflow is distributed equally to the glasses below.
The glasses form a pyramid shape, with the topmost glass being the first level and each subsequent level having one more glass than the previous level.
The amount of water held by each glass can be calculated by dividing the total amount of water by the number of ...
Divide a rectangle of M x N into smaller rectangles of M1 x N1 to minimize wastage.
Start by dividing the rectangle horizontally or vertically based on the dimensions of the smaller rectangles.
Continue dividing each resulting sub-rectangle until no further division is possible.
Consider the dimensions of the smaller rectangles and the remaining space to minimize wastage.
Keep track of the divisions made to reconstruct the
The number of 'BB' occurrences at the Nth iteration of the transformation sequence.
At each iteration, A gets transformed to AB and B gets transformed to BA.
To find the number of 'BB' occurrences at the Nth iteration, we need to count the number of 'BB' substrings in the transformed string.
The transformation sequence follows a pattern: AB, ABA, ABAAB, ABAABABA, ...
The number of 'BB' occurrences doubles with each iterati...
Use binary search starting from top right corner to find the number in O(n+m) complexity.
Start from the top right corner of the matrix
If the current number is greater than the target, move left
If the current number is less than the target, move down
Repeat until the number is found or out of bounds
My sister would say I am caring and reliable. My friends would say I am funny and outgoing.
Sister: caring, reliable
Friends: funny, outgoing
I would prefer Google for its search engine, Microsoft for its software, and Amazon for its e-commerce services.
Google for its powerful search engine
Microsoft for its software products like Office Suite and Windows OS
Amazon for its e-commerce services and Prime membership benefits
Sorting an array of 0, 1 and 2 can be done in O(n) using two pointers.
Use two pointers, one for 0 and one for 2, and a current pointer to traverse the array
If the current pointer encounters a 0, swap it with the 0 pointer and move both pointers to the right
If the current pointer encounters a 2, swap it with the 2 pointer and move the 2 pointer to the left
Repeat until the current pointer meets the 2 pointer
Algorithm to find if a number is present in a sorted n x n matrix with linear time complexity.
Start with the top right element
Compare the element with x
If equal, return its position
If e < x, move down (if out of bounds, return false)
If e > x, move left (if out of bounds, return false)
Repeat till element is found or returned false
The problem is to find non-empty subsets of a given set of integers whose sum is zero.
The problem is a special case of the knapsack problem and is known to be NP-Complete.
A brute-force approach would involve generating all subsets and checking their sums.
The brute-force approach has an exponential time complexity.
There is no known polynomial time solution for this problem.
Data structure with O(1) insert, delete, and find min without creating new structures
Use two stacks, one for actual data and one for minimum values
When inserting, push the value onto the data stack and push the minimum of the new value and the top of the minimum stack onto the minimum stack
When deleting, pop from both stacks
When finding the minimum, return the top of the minimum stack
Top trending discussions
Some of the top questions asked at the Directi interview -
based on 6 interviews
Interview experience
Software Development Engineer II
13
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
11
salaries
| ₹0 L/yr - ₹0 L/yr |
Product Manager
11
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
9
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
9
salaries
| ₹0 L/yr - ₹0 L/yr |
Zoho
TCS
Infosys
Wipro