Atlassian
Havells Interview Questions and Answers
Q1. Ninja and His Meetings Problem Statement
Ninja has started a new startup with a single conference room available for meetings. Given an array/list MEETINGS
of consecutive appointment requests, Ninja must decide...read more
Find the maximum total booked minutes possible in a conference room for given meeting durations with a 15-minute break between meetings.
Iterate through the list of meeting durations and calculate the maximum total booked minutes by considering the 15-minute break constraint.
Keep track of the total booked minutes and skip consecutive meetings that violate the break constraint.
Return the maximum total booked minutes for each test case.
Q2. Total Unique Paths Problem Statement
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calculate the...read more
Calculate total unique paths from top-left to bottom-right corner of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of the paths from the cell above and the cell to the left.
Return the value in the bottom-right corner of t...read more
Q3. Reorder Edges Problem Statement
Given a connected directed acyclic graph with 'N' nodes and 'N-1' edges, where each pair of nodes is connected by exactly one edge, you can perform the following operation any nu...read more
The task is to implement a function that reorders edges in a directed acyclic graph to ensure a directed path exists from every node to node 0 with minimum edge reversals.
Iterate through the graph to find the shortest path from each node to node 0.
Determine the number of edge reversals needed to create a directed path from each node to node 0.
Implement a function that performs the edge reversal operation efficiently.
Consider using graph traversal algorithms like BFS or DFS to...read more
Q4. Snake and Ladder Problem Statement
Given a 'Snake and Ladder' board with N rows and N columns, where positions are numbered from 1 to (N*N) starting from the bottom left, alternating direction each row, find th...read more
Find the minimum number of dice throws required to reach the last cell on a 'Snake and Ladder' board.
Use Breadth First Search (BFS) algorithm to find the shortest path from the starting cell to the last cell.
Maintain a queue to keep track of the cells to be visited next.
Consider the effect of snakes and ladders on the movement of the player.
Handle the boundary conditions and constraints specified in the problem statement.
Return the minimum number of throws required to reach t...read more
Q5. Ninja and Geometry Problem Statement
In this problem, Ninja is provided with two lines on a 2D plane. The first line 'AB' is determined by two points A and B. The second line 'PQ' is determined by two points P ...read more
Calculate the intersection point of two lines on a 2D plane with precision up to six decimal places.
Parse input integers for each test case
Implement line intersection algorithm
Handle precision up to six decimal places in output
Return -1.000000 -1.000000 if lines do not intersect
Q6. Longest increasing subsequence
Find the longest increasing subsequence in an array
Use dynamic programming to solve this problem
Iterate through the array and keep track of the longest increasing subsequence ending at each index
Time complexity can be optimized to O(n log n) using binary search
More about working at Atlassian
Interview Process at Havells
Top Software Developer Intern Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month