
Housing.com


Housing.com Front end Engineer Interview Questions and Answers
Q1. Pair Sum Problem Statement
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Note:
Each pa...read more
Find pairs of elements in an array that sum up to a given value, sorted in a specific order.
Iterate through the array and use a hashmap to store the difference between the target sum and each element.
Check if the difference exists in the hashmap, if so, add the pair to the result list.
Sort the result list based on the criteria mentioned in the question.
Return the sorted list of pairs.
Deep copy creates a new copy of an object/array with all nested values copied, while shallow copy creates a new object/array with references to the original nested values.
Deep copy creates a completely new copy of an object/array, including all nested values, while shallow copy only creates a new object/array with references to the original nested values.
In JavaScript, deep copy can be achieved using methods like JSON.parse(JSON.stringify(obj)) or libraries like Lodash's _.cl...read more
Absolute positioning is relative to the nearest positioned ancestor, while fixed positioning is relative to the viewport.
Absolute positioning is relative to the nearest positioned ancestor.
Fixed positioning is relative to the viewport.
Absolute positioned elements are removed from the normal document flow.
Fixed positioned elements stay in the same position even when the page is scrolled.
Yes, event delegation can be achieved by attaching an event listener to a parent element and then checking the target element of the event.
Attach an event listener to a parent element that contains the child elements you want to delegate events to.
Check the target element of the event to determine if it matches the desired child element.
Perform the appropriate action based on the target element.
A browser renders a webpage by parsing HTML, CSS, and JavaScript, constructing the DOM tree, rendering the layout, and painting the pixels on the screen.
Browser requests the HTML file from the server
Browser parses the HTML and constructs the DOM tree
Browser fetches external resources like CSS and JavaScript files
Browser applies CSS styles to the DOM elements and constructs the render tree
Browser executes JavaScript code and updates the DOM accordingly
Browser calculates the la...read more
Closures in JavaScript are functions that have access to variables from their outer scope even after the outer function has finished executing.
Closures allow functions to access variables from their parent function's scope
They are created whenever a function is defined within another function
Closures can be used to create private variables and functions in JavaScript
Webpack is a module bundler for JavaScript applications.
Webpack takes modules with dependencies and generates static assets representing those modules.
It can handle various types of assets like JavaScript, CSS, and images.
Webpack allows for code splitting, lazy loading, and hot module replacement.
Common configuration options include entry, output, loaders, and plugins.
More about working at Housing.com







Reviews
Interviews
Salaries
Users/Month

