Add office photos
Employer?
Claim Account for FREE

Housing.com

3.8
based on 519 Reviews
Filter interviews by

90+ Defa Lighting Solutions Interview Questions and Answers

Updated 22 Oct 2024
Popular Designations
Q1. Fix BST

Given a Binary Search Tree, where exactly two nodes of the same tree were swapped by mistake. The task is to restore or fix the BST, without changing its structure.

A binary search tree (BST), also calle...read more

View 5 more answers
Q2. Find Duplicate in Array

You are given an array of integers 'ARR' containing N elements. Each integer is in the range [1, N-1], with exactly one element repeated in the array.

Your task is to find the duplicate e...read more

View 6 more answers
Q3. Largest subarray with equal number of 0s and 1s

You are given an array consisting of 0s and 1s. You need to find the length of the largest subarray with an equal number of 0s and 1s.

For example:

If the given ar...read more
View 4 more answers
Q4. Count Ways To Reach The N-th Stairs

You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair. Each time you can either climb one step or two steps. You are...read more

View 5 more answers
Discover Defa Lighting Solutions interview dos and don'ts from real experiences
Q5. Count Inversions

For a given integer array/list 'ARR' of size 'N', find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two co...read more

View 4 more answers
Q6. Word Ladder

You are given two strings BEGIN and END and an array of strings DICT. Your task is to find the length of the shortest transformation sequence from BEGIN to END such that in every transformation you c...read more

View 4 more answers
Are these interview questions helpful?
Q7. Shortest Bridge

Every story has an Endgame. This is another such story.

Tony Stark and Thanos live in two different islands. Tony wants to reach Thanos's island in minimum time to save the world.

You are given a...read more

View 4 more answers
Q8. Connect Nodes at Same Level

A binary tree is a tree where each node has at most two children i.e left child and right child.

You are given a binary tree, where the structure of the node is as follow -:

class Bin...read more
View 3 more answers
Share interview questions and help millions of jobseekers 🌟
Q9. The Skyline Problem

You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings ...read more

View 3 more answers
Q10. Ninja and Two Sorted Arrays

Ninja has been given two sorted integer arrays/lists ‘ARR1’ and ‘ARR2’ of size ‘M’ and ‘N’. Ninja has to merge these sorted arrays/lists into ‘ARR1’ as one sorted array. You may have ...read more

View 3 more answers
Q11. Add Two Numbers As Linked Lists

You are given two linked lists representing two non-negative numbers. The digits in the linked list are stored in reverse order, i.e. starting from least significant digit (LSD) t...read more

View 4 more answers
Q12. Overlapping Intervals

You have been given the start and end times of 'N' intervals. Write a function to check if any two intervals overlap with each other.

Note :
If an interval ends at time T and another interv...read more
View 3 more answers

Q13. Given two sides of a river having the same cities labeled in characters. Bridges are to be drawn from one side to another that can connect the same labels but the bridges shudnt cross each other. Find the max n...

read more
Ans.

The maximum number of bridges that can be connected between two sides of a river without crossing each other.

  • This is a dynamic programming problem.

  • Create a 2D array to store the maximum number of bridges that can be connected at each position.

  • Initialize the first row and column of the array with 0.

  • Iterate through the sides of the river and compare the labels.

  • If the labels match, update the value in the array by adding 1 to the diagonal element.

  • If the labels don't match, take ...read more

Add your answer
Q14. Longest Substring Without Repeating Characters

Given a string 'S' of length 'L', return the length of the longest substring without repeating characters.

Example:

Suppose given input is "abacb", then the length ...read more
View 5 more answers
Q15. Sum root to leaf

You are given an arbitrary binary tree consisting of N nodes where each node is associated with a certain integer value from 1 to 9. Consider each root to leaf path as a number.

For example:

 1 ...read more
View 2 more answers
Q16. Pair Sum

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair shou...read more
View 4 more answers
Q17. Maximum level sum

Given a Binary Tree with integer nodes, your task is to find the maximum level sum among all the levels in the Binary Tree. The sum of any level in a tree is the sum of all the nodes present at...read more

View 3 more answers
Q18. Maximum Sum Circular Subarray

You have been given a circular array/list ‘ARR’ containing ‘N’ integers. You have to find out the maximum possible sum of a non-empty subarray of ‘ARR’.

A circular array is an array...read more

View 3 more answers
Q19. Replace Spaces

You have been given a string 'STR' of words. You need to replace all the spaces between words with “@40”.

Input Format:
The first line contains a single integer ‘T’ representing the number of test...read more
View 3 more answers
Q20. Word Break-1

You are given a non-empty string containing no spaces (say sentence) and a dictionary of list of non-empty strings (say the list of words). You are supposed to construct and return all possible sen...read more

View 4 more answers
Q21. Painter's Partition Problem

Given an array/list of length ‘N’, where the array/list represents the boards and each element of the given array/list represents the length of each board. Some ‘K’ numbers of painter...read more

View 4 more answers
Q22. Sum of Big integers.

You have been given two integers ‘NUM1’ and ‘NUM2’ as a string. Your task is to print the sum of both the numbers.

Input Format:
The first line contains a single integer ‘T’ representing the...read more
View 2 more answers

Q23. Given a set of n steps. A person can climb one or two steps at a time. Find the number of ways in which one can reach the nth step. (Easy stuff.. I probably wasn't doing good by this time)

Ans.

The number of ways to reach the nth step using 1 or 2 steps at a time.

  • Use dynamic programming to solve this problem

  • Create an array to store the number of ways to reach each step

  • Initialize the first two elements of the array as 1, since there is only one way to reach the first and second steps

  • For each subsequent step, the number of ways to reach it is the sum of the number of ways to reach the previous two steps

  • Return the value at the nth index of the array

Add your answer
Q24. System Design Question

Design a system for Bookmyshow.com. When we book seats we the seats must be locked till the time payment gateway is reached. Also consider no payment done and payment failures.

Add your answer

Q25. Make a set of all nodes that can occur in any path from a source to a destination in both directed as well as undirected graph. Note that a node can be visited any number of times not necessarily only once.

Ans.

The set of all nodes that can occur in any path from a source to a destination in both directed and undirected graphs.

  • Perform a depth-first search (DFS) or breadth-first search (BFS) from the source node to the destination node.

  • During the search, keep track of all visited nodes.

  • Add each visited node to the set of nodes that can occur in any path.

  • Repeat the search for both directed and undirected graphs.

  • The resulting set will contain all nodes that can occur in any path from t...read more

Add your answer

Q26. Given many pairs intervals with their start and end. Find the maximum interval which intersects the maximum number of intervals. Look for corner cases again!

Ans.

Find the maximum interval that intersects the maximum number of intervals.

  • Sort the intervals based on their start times.

  • Iterate through the sorted intervals and keep track of the current interval with the maximum number of intersections.

  • Update the maximum interval whenever a new interval intersects more intervals than the current maximum interval.

Add your answer

Q27. Given an array, return true, if it can be partitioned into two subarrays whose sum of elements are same, else return false Example: Input: {5,1,5,11} Output: true (as it can be divided into {5,1,5} {11} where 5...

read more
Ans.

Check if an array can be partitioned into two subarrays with equal sum.

  • Iterate through the array and calculate the total sum of all elements.

  • If the sum is odd, return false as it cannot be divided into two equal parts.

  • If the sum is even, try to find a subset with sum equal to half of the total sum.

  • Use dynamic programming or backtracking to find the subset sum.

View 1 answer

Q28. Given two sorted arrays find of size n and m. The n sized array has m spaces empty at the end. Code to merge these to arrays in single pass O(n+m).

Ans.

Merge two sorted arrays with empty spaces at the end in a single pass.

  • Initialize two pointers at the end of each array

  • Compare the elements at the pointers and place the larger element at the end of the merged array

  • Decrement the pointer of the array from which the larger element was taken

  • Repeat until all elements are merged

Add your answer

Q29. How will you kill all java process in one command ?

Ans.

Use 'pkill' command with '-f' option to kill all java processes.

  • Open terminal or command prompt

  • Type 'pkill -f java' and press enter

  • All java processes will be terminated

View 1 answer

Q30. How do you think does the rental real estate work in India

Ans.

Rental real estate in India is a thriving market with high demand and various factors influencing its functioning.

  • Rental real estate in India is driven by factors such as location, property type, and market demand.

  • The rental market in India is highly competitive, especially in major cities like Mumbai, Delhi, and Bangalore.

  • Property owners can earn rental income by leasing out residential or commercial properties.

  • Rent agreements in India typically involve a fixed term, securit...read more

View 3 more answers
Q31. System Design Question

Implement an auto suggest in search engine. Like for google when u type max say maximum must be suggested in drop down.

Add your answer

Q32. Given a binary tree. Code to have each node point to the next node in the same level. Last element in the level must point to NULL

Ans.

The code should traverse the binary tree level by level and update the next pointers accordingly.

  • Use a queue to perform level order traversal of the binary tree.

  • For each node, update its next pointer to point to the next node in the queue.

  • If the current node is the last node in the level, update its next pointer to NULL.

Add your answer

Q33. Given a square area of 1024x1024 on a map with some flats (housing mentality :P) with their location (x,y) and visibility index (~price or value). You have to show every flat with a square of 32x32 in the map.

Ans.

Given a map with flats and their location and visibility index, show every flat with a square of 32x32.

  • Create a 1024x1024 map with flats and their visibility index

  • Loop through each flat and draw a 32x32 square around it

  • Display the map with all the flats highlighted

Add your answer
Q34. CSS Question

What are the different attributes for CSS position property?

Add your answer
Q35. Technical Question

What are Grunt modules/plugins?

Add your answer

Q36. Implement a ctlr+f (find) functionality in a file. Make a data structure for this implementation

Ans.

Implement a ctlr+f (find) functionality in a file using a data structure.

  • Create a data structure to store the file content, such as an array of strings.

  • Implement a function that takes a search query and returns the matching lines from the file.

  • Use string matching algorithms like Knuth-Morris-Pratt or Boyer-Moore for efficient searching.

  • Consider optimizing the data structure for faster search operations, like using a trie or a hash table.

Add your answer

Q37. Case Study 1: How many women travel in a Delhi metro line on a Saturday

Ans.

The exact number of women traveling in a Delhi metro line on a Saturday is not available.

  • The Delhi metro authorities do not provide real-time data on the number of women passengers.

  • The number of women traveling on a Saturday can vary depending on various factors such as time of day, specific metro line, and events happening in the city.

  • To determine the exact number, a survey or data collection process would be required.

  • The Delhi metro authorities may have historical data on t...read more

Add your answer
Q38. Technical Question

List out the Data Types that SassScript supports?

Add your answer

Q39. Add two integers which cannot be stored even in long long int?

Ans.

It is not possible to add two integers that cannot be stored even in long long int.

  • The maximum value that can be stored in long long int is 9,223,372,036,854,775,807.

  • Any two integers whose sum exceeds this value cannot be stored in long long int.

  • In such cases, a different data type or approach is required to handle the large numbers.

Add your answer
Q40. Technical Question

How does the server work?

Add your answer
Q41. Shell Scripting Question

How will you kill all java process in one command ?

Add your answer

Q42. Given a file with random content, could you find out all the phone numbers ?

Ans.

Yes, by using regular expressions to match phone number patterns.

  • Use regular expressions to match phone number patterns

  • Common phone number patterns include (XXX) XXX-XXXX and XXX-XXX-XXXX

  • Consider international phone number formats as well

  • Use a programming language with regex support, such as Python or JavaScript

View 1 answer

Q43. input: “kitten%20pic.jpg” output: “kitten pic.jpg” %20 -> ‘ ‘ %3A -> ‘?’ %3D -> ‘:’ modify your input in place. no string library functions. void DecodeURL(string str

Ans.

The function decodes a URL-encoded string by replacing specific characters with their corresponding symbols.

  • Iterate through each character in the input string

  • If the character is '%', check the next two characters to determine the replacement symbol

  • Replace the '%XX' sequence with the corresponding symbol

  • Continue until all occurrences of '%XX' are replaced

Add your answer

Q44. Case Study 2: How many Nike shoes get sold in India during sale season

Ans.

The number of Nike shoes sold in India during sale season is not available.

  • Data on the number of Nike shoes sold in India during sale season is not provided.

  • The exact number of Nike shoes sold during sale season can vary each year.

  • Sales data for Nike shoes in India during sale season is not publicly available.

Add your answer
Q45. System Design Question

Implement a ctlr+f (find) functionality in a file.

Add your answer

Q46. How will you monitor file change in linux ?

Ans.

Use inotifywait command to monitor file changes in Linux.

  • Install inotify-tools package

  • Use inotifywait command with options like -m for continuous monitoring and -e for specific events

  • Example: inotifywait -m /var/log/messages -e modify

  • Output will show the file path, event type and timestamp

Add your answer
Q47. Technical Question

Difference between function expression and function declaration

Add your answer
Q48. Web Based Question

How browser renders a webpage?

Add your answer

Q49. What are the revenue sources of Airtel and arrive at an approximate figure for it?

Ans.

Airtel's revenue sources include mobile services, digital TV, enterprise services, and others. Approximate figure is around $12 billion.

  • Mobile services including voice and data

  • Digital TV services

  • Enterprise services such as cloud and connectivity solutions

  • Other sources such as payments bank and Airtel Xstream

  • Approximate revenue figure is around $12 billion

Add your answer

Q50. Usecase for chef and why do you need it ?

Ans.

Chef is a configuration management tool used for automating infrastructure deployment and management.

  • Chef helps in automating the process of configuring and managing servers and applications.

  • It allows for consistent and repeatable infrastructure deployments.

  • Chef can be used to manage both on-premises and cloud-based infrastructure.

  • It provides a centralized platform for managing configurations and enforcing policies.

  • Chef can be integrated with other DevOps tools like Jenkins a...read more

Add your answer

Q51. Find out the maximum contiguous circular sum in array, array may contain positive as well as negative numbers?

Ans.

The maximum contiguous circular sum in an array is the maximum sum that can be obtained by wrapping the array around in a circular manner.

  • To find the maximum contiguous circular sum, we can use Kadane's algorithm twice.

  • First, we find the maximum sum using Kadane's algorithm for the non-circular array.

  • Then, we find the maximum sum using Kadane's algorithm for the circular array by subtracting the minimum sum subarray from the total sum of the array.

  • The maximum of these two sum...read more

Add your answer

Q52. How do you think financial markets impact real estate

Ans.

Financial markets have a significant impact on real estate by influencing interest rates, investment flows, and property values.

  • Interest rates: Changes in interest rates affect mortgage rates, making it more or less affordable for individuals to buy homes.

  • Investment flows: Investors often allocate funds between financial markets and real estate, impacting property prices and demand.

  • Property values: Economic conditions and investor sentiment in financial markets can influence ...read more

Add your answer

Q53. How would you optimise a given sql query ?

Ans.

Optimise SQL query by identifying bottlenecks and improving indexing and query structure.

  • Identify slow performing queries using profiling tools

  • Improve indexing by adding or removing indexes

  • Rewrite query structure to reduce complexity and improve performance

  • Use query optimisation techniques like subqueries and joins

  • Consider caching frequently accessed data

Add your answer
Q54. OS Question

How will you monitor file change in linux ?

Add your answer

Q55. Ruby program to find out if a directory exists and you write permissions to it ?

Ans.

Ruby program to check directory existence and write permissions.

  • Use File.exist? method to check if directory exists.

  • Use File.writable? method to check if directory has write permissions.

  • Combine both methods to get the desired result.

Add your answer

Q56. if good, why is it good? And if bad, what can be done to make it better?

Ans.

Good is subjective and can vary based on context. Bad can be improved by identifying and addressing the root cause.

  • Good can be good because it meets a specific need or requirement

  • Good can also be good because it exceeds expectations or provides additional benefits

  • Bad can be improved by identifying the root cause of the issue

  • Once the root cause is identified, a plan can be put in place to address it

  • Regular evaluation and feedback can help ensure continued improvement

Add your answer
Q57. Technical Question

Difference between Sockets and Ajax

Add your answer
Q58. OS Question

What is a process in linux?

Add your answer
Q59. Javascript Question

What are closures?

Add your answer

Q60. Estimate the money spent in rental housing in Bombay for 1BHK and 2 BHK apartments?

Ans.

The estimated money spent on rental housing in Bombay for 1BHK and 2BHK apartments depends on various factors such as location, amenities, and demand.

  • The rental prices for 1BHK and 2BHK apartments vary depending on the location in Bombay.

  • The rental prices are higher in areas like South Bombay, Bandra, and Juhu compared to suburbs like Thane and Navi Mumbai.

  • The rental prices also depend on the amenities provided by the apartment complex such as gym, swimming pool, and parking ...read more

Add your answer

Q61. Length of longest substring with no repeating character (Full running code)?

Ans.

Find the length of the longest substring without any repeating characters.

  • Use a sliding window approach to iterate through the string.

  • Keep track of the characters seen so far using a set.

  • Update the maximum length of the substring whenever a repeating character is encountered.

Add your answer

Q62. What do you do when a real estate broker scams by taking commission separately?

Ans.

Report the scam to the appropriate authorities and seek legal action.

  • Gather evidence of the scam such as emails, contracts, and receipts.

  • Report the scam to the local real estate board or regulatory agency.

  • Consider seeking legal action against the broker.

  • Inform others in the industry about the scam to prevent future incidents.

  • Be cautious when working with new brokers and thoroughly research their reputation and track record.

Add your answer

Q63. Use of position relative,absolute,fixed and static

Ans.

Position property in CSS

  • position: static is the default value

  • position: relative is relative to its normal position

  • position: absolute is relative to the nearest positioned ancestor

  • position: fixed is relative to the viewport

Add your answer
Q64. Technical Question

Use cases for Chef and why is it needed

Add your answer
Q65. Javascript Question

Explain deep and shallow copy with examples.

Add your answer
Q66. Javascript Question

What is a webpack?

Add your answer
Q67. Technical Question

Ruby Program to check if a directory exists or not

Add your answer
Q68. CSS Question

Difference between absolute and fixed positioning in CSS

Add your answer

Q69. How the server works?

Ans.

A server is a computer program that provides services to other computer programs or clients over a network.

  • A server listens for incoming requests from clients

  • It processes the requests and sends back the response

  • Servers can be dedicated or shared

  • Examples include web servers, email servers, and file servers

Add your answer

Q70. What is a process in linux ?

Ans.

A process in Linux is a running instance of a program or command.

  • A process is identified by a unique process ID (PID)

  • Processes can be started, stopped, and managed using commands like ps, kill, and top

  • Processes can run in the foreground or background

  • Processes can communicate with each other through inter-process communication (IPC)

  • Examples of processes include web servers, database servers, and user applications

Add your answer

Q71. How does a linux boot ?

Ans.

Linux boot process involves several stages including BIOS, bootloader, kernel initialization, and user space initialization.

  • BIOS performs a power-on self-test and loads the bootloader from the boot device.

  • Bootloader loads the kernel into memory and initializes it.

  • Kernel initializes hardware, mounts the root file system, and starts the init process.

  • Init process starts user space processes and services.

  • Linux boot process can be customized by modifying bootloader configuration a...read more

Add your answer

Q72. Calculate revenue of the government electricity board of Maharastra

Ans.

Sorry, I cannot answer this question without available data.

  • No data available to calculate revenue of the government electricity board of Maharastra.

Add your answer
Q73. Javascript Question

Write pollyfill for event delegation.

Add your answer
Q74. OS Question

How does a linux boot?

Add your answer

Q75. Given a binary tree, print sum of each level ?

Ans.

Given a binary tree, print sum of each level

  • Use a breadth-first search (BFS) algorithm to traverse the tree level by level

  • Keep track of the sum of each level using a separate variable for each level

  • Print the sum of each level after traversing the entire tree

Add your answer

Q76. Why use node?

Ans.

Node is a popular server-side JavaScript runtime environment.

  • Node is fast and efficient for handling I/O operations.

  • It has a large and active community with a vast number of modules available.

  • Node allows for easy scalability and can handle a large number of concurrent connections.

  • It is cross-platform and can run on various operating systems.

  • Node is commonly used for building real-time applications, APIs, and microservices.

Add your answer
Q77. DBMS Question

SQL Query Optimisation Techniques

Add your answer

Q78. What are the qualities of product manager?

Ans.

A product manager should have strong leadership, communication, and analytical skills.

  • Leadership: Ability to inspire and motivate cross-functional teams towards a common goal.

  • Communication: Excellent communication skills to effectively convey product vision, strategy, and roadmap to stakeholders.

  • Analytical skills: Ability to analyze data and make data-driven decisions to improve product performance.

  • Customer-focused: Understanding customer needs and pain points to develop prod...read more

Add your answer
Q79. Puzzle

Bag of Coins

Add your answer

Q80. Give examples of good products and bad products.

Ans.

Good products solve problems and provide value, while bad products are poorly designed and fail to meet user needs.

  • Good products are intuitive and easy to use

  • Good products have a clear value proposition

  • Good products are reliable and perform well

  • Bad products have confusing interfaces and are difficult to navigate

  • Bad products lack key features or have unnecessary ones

  • Bad products are prone to bugs and crashes

  • Example of good product: iPhone

  • Example of bad product: Juicero

Add your answer
Q81. Puzzle

Josephus problem

Add your answer

Q82. Theory behind the movie interstellar?

Ans.

Interstellar is a science fiction movie that explores the concept of time travel and the survival of humanity.

  • The movie is based on the theory of relativity and the concept of wormholes.

  • It explores the idea of time dilation, where time moves slower in a strong gravitational field.

  • The movie also touches upon the consequences of climate change and the need for humanity to find a new habitable planet.

  • The plot revolves around a group of astronauts who travel through a wormhole in...read more

Add your answer

Q83. Sockets vs Ajax

Ans.

Sockets and Ajax are both used for real-time communication, but sockets are more efficient for continuous data transfer.

  • Sockets provide a persistent connection between client and server, while Ajax uses HTTP requests.

  • Sockets are faster and more efficient for real-time data transfer.

  • Ajax is better suited for occasional data updates or small amounts of data.

  • Examples of socket-based applications include chat rooms and online gaming.

  • Examples of Ajax-based applications include soc...read more

Add your answer
Ans.

It is not clear what 'it' refers to in the question.

  • Please provide more context or clarify the question.

  • Without additional information, it is impossible to answer the question.

  • Can you please rephrase the question or provide more details?

Add your answer

Q85. how to do inheritance with prototypes

Ans.

Inheritance with prototypes allows objects to inherit properties and methods from other objects in JavaScript.

  • Create a constructor function for the parent object

  • Add properties and methods to the parent object's prototype

  • Create a constructor function for the child object

  • Set the child object's prototype to be an instance of the parent object

Add your answer

Q86. Sales Ticket Size Till Date

Ans.

The average value of sales made per transaction till date.

  • Sales ticket size till date is the average value of sales made per transaction.

  • It is calculated by dividing the total sales revenue by the number of transactions.

  • For example, if a company has made $100,000 in sales from 1,000 transactions, the sales ticket size till date would be $100.

  • This metric can help identify trends in customer spending habits and inform pricing strategies.

  • It can also be used to track the effectiv...read more

Add your answer

Q87. What is prototypal Inheritance

Ans.

Prototypal Inheritance is a way of creating objects based on existing objects.

  • Objects inherit properties and methods from their prototype object

  • Allows for efficient use of memory and code reuse

  • Can lead to unexpected behavior if not used carefully

Add your answer

Q88. Pricing of a product

Ans.

Pricing of a product

  • Consider the cost of production, marketing, and distribution

  • Analyze the competition and market demand

  • Determine the value proposition and target audience

  • Set a price that is competitive and profitable

  • Regularly review and adjust pricing strategy

Add your answer

Q89. what is es6 features

Ans.

ES6 (ECMAScript 2015) is a major update to JavaScript that introduced new features and syntax.

  • let and const for variable declaration

  • arrow functions for concise syntax

  • template literals for string interpolation

  • destructuring for easy assignment of object properties

  • spread and rest operators for manipulating arrays and objects

  • classes for object-oriented programming

  • modules for better code organization

Add your answer

Q90. Generics method map implementation

Ans.

Implement a generics method map in Java

  • Create a generic method that takes an array and a function as parameters

  • Use a lambda expression to apply the function to each element in the array

  • Return a new array with the transformed elements

Add your answer

Q91. rotated sorted array problem

Ans.

Rotated sorted array problem involves finding a target element in a rotated sorted array.

  • Use binary search to find the pivot point where the array is rotated.

  • Divide the array into two subarrays and perform binary search on the appropriate subarray.

  • Handle cases where the target element is at the pivot point or not present in the array.

Add your answer

Q92. explain closures with examples

Ans.

Closures are functions that have access to variables in their outer scope.

  • Closures are created when a function is defined inside another function.

  • The inner function has access to the outer function's variables, even after the outer function has returned.

  • Closures can be used to create private variables and methods in JavaScript.

  • Example: function outer() { let x = 10; function inner() { console.log(x); } return inner; } const closure = outer(); closure(); // logs 10

Add your answer

Q93. explain closure in JS

Ans.

Closure in JS is when a function is able to remember and access its lexical scope even when it is executed outside that scope.

  • Closure allows a function to access variables from its outer function even after the outer function has finished executing.

  • Functions in JavaScript form closures, which means they 'remember' the variables in the scope where they were created.

  • Closures are commonly used in event handlers, callbacks, and in modules to create private variables.

Add your answer

Q94. Design Heap( tree)

Ans.

Design a heap tree data structure

  • A heap is a complete binary tree where the value of each node is greater than or equal to the values of its children

  • There are two types of heaps: min heap (parent node is smaller than children) and max heap (parent node is larger than children)

  • Heap can be implemented using arrays where parent node at index i has children at indices 2i+1 and 2i+2

Add your answer

Q95. Last ctc about sk

Ans.

The candidate is being asked about their last drawn salary package.

  • Be honest and provide the exact figure of your last drawn CTC.

  • Explain any additional benefits or perks included in the CTC.

  • Mention any bonuses or incentives received on top of the CTC.

  • Discuss any salary negotiations or increments during your tenure.

  • Avoid exaggerating or understating your last CTC.

Add your answer

More about working at Housing.com

#8 Best Tech Startup - 2022
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Defa Lighting Solutions

based on 23 interviews in the last 1 year
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.9
 • 392 Interview Questions
4.0
 • 375 Interview Questions
4.2
 • 199 Interview Questions
3.9
 • 186 Interview Questions
3.6
 • 165 Interview Questions
3.5
 • 160 Interview Questions
View all
Top Housing.com Interview Questions And Answers
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
Get AmbitionBox app

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