Add office photos
Employer?
Claim Account for FREE

Atlassian

3.6
based on 123 Reviews
Filter interviews by

Havells Interview Questions and Answers

Updated 30 May 2024
Popular Designations

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

Ans.

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.

Add your answer

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

Ans.

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

Add your answer

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

Ans.

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

Add your answer

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

Ans.

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

Add your answer
Discover Havells interview dos and don'ts from real experiences

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

Ans.

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

Add your answer

Q6. Longest increasing subsequence

Ans.

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

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Havells

based on 4 interviews
2 Interview rounds
Coding Test Round - 1
Coding Test Round - 2
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Intern Interview Questions from Similar Companies

4.4
 • 30 Interview Questions
3.8
 • 21 Interview Questions
4.0
 • 21 Interview Questions
3.4
 • 13 Interview Questions
4.2
 • 12 Interview Questions
4.0
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter