Add office photos
Housing.com logo
Employer?
Claim Account for FREE

Housing.com

3.7
based on 547 Reviews
Video summary
Filter interviews by
Software Developer
Skills
Clear (1)

10+ Housing.com Software Developer Interview Questions and Answers

Updated 16 Jan 2025

Q1. Maximum Level Sum Problem Statement

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

Ans.

Find the maximum level sum in a binary tree with integer nodes.

  • Traverse the binary tree level by level and calculate the sum of nodes at each level.

  • Keep track of the maximum level sum encountered so far.

  • Return the maximum level sum as the output.

Add your answer
right arrow

Q2. Maximum Sum Circular Subarray Problem Statement

Find the maximum possible sum of a non-empty subarray from a given circular array/list ARR containing N integers.

Explanation:

The array is circular, meaning the ...read more

Ans.

Find the maximum sum of a non-empty subarray from a circular array.

  • Identify the maximum sum of a non-empty subarray within the circular array

  • Consider both normal and circular subarrays to find the maximum sum

  • Implement a function to solve the problem efficiently

Add your answer
right arrow

Q3. Sum of Big Integers Problem Statement

Given two integers, NUM1 and NUM2, as strings, your task is to compute and return the sum of these numbers.

Input:

The first line contains an integer T, the number of test ...read more
Ans.

Implement a function to compute the sum of two large integers given as strings.

  • Convert the input strings to integers and add them digit by digit from right to left, considering carry over.

  • Handle cases where one number is longer than the other by padding with zeros.

  • Return the final sum as a string.

Add your answer
right arrow

Q4. Replace Spaces in a String

Given a string STR consisting of words separated by spaces, your task is to replace all spaces between words with the characters "@40".

Input:

The first line contains an integer ‘T’ d...read more
Ans.

Replace spaces in a string with '@40'.

  • Iterate through the string and replace spaces with '@40'.

  • Use string manipulation functions to achieve the desired output.

  • Handle multiple test cases by looping through each input string.

Add your answer
right arrow
Discover Housing.com interview dos and don'ts from real experiences

Q5. Painter's Partition Problem Statement

Given an array/list representing boards, where each element denotes the length of a board, and a number ‘K’ of available painters, determine the minimum time required to pa...read more

Ans.

The problem involves determining the minimum time required to paint all boards with a given number of painters.

  • Iterate through the array to find the maximum board length.

  • Use binary search to find the minimum time required to paint all boards.

  • Optimize the painting process by assigning continuous sections of boards to painters.

Add your answer
right arrow

Q6. Word Break Problem - Generate Sentences

Given a non-empty string sentence containing no spaces and a dictionary of non-empty strings words, your task is to construct and return all possible meaningful sentences...read more

Ans.

Given a string without spaces and a dictionary of words, generate all possible sentences by inserting spaces.

  • Use backtracking to generate all possible combinations of words from the dictionary to form sentences

  • Iterate through the string and try to match substrings with words from the dictionary

  • Recursively build sentences by adding words that match the substrings

  • Return all valid sentences formed

Add your answer
right arrow
Are these interview questions helpful?

Q7. 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
right arrow

Q8. Longest Substring Without Repeating Characters Problem Statement

Given a string S of length L, determine the length of the longest substring that contains no repeating characters.

Example:

Input:
"abacb"
Output...read more
Ans.

Find the length of the longest substring without repeating characters in a given string.

  • Use a sliding window approach to keep track of the longest substring without repeating characters.

  • Use a hashmap to store the index of each character in the string.

  • Update the start index of the window when a repeating character is encountered.

  • Calculate the maximum length of the substring as you iterate through the string.

  • Return the maximum length of the substring at the end.

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. 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
right arrow

Q10. 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
right arrow

Q11. 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
right arrow

Q12. Given a rotated sorted array, how can you search for a target value efficiently using the binary search algorithm?

Ans.

Use binary search algorithm with slight modifications to handle rotated sorted array efficiently.

  • Find the pivot point where the array is rotated.

  • Determine which half of the array the target value lies in based on the pivot point.

  • Perform binary search on the appropriate half of the array.

Add your answer
right arrow

Q13. 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
right arrow

Q14. 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
right arrow

Q15. 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
right arrow

More about working at Housing.com

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

Interview Process at Housing.com Software Developer

based on 4 interviews
1 Interview rounds
One-on-one Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

Flipkart Logo
4.0
 • 81 Interview Questions
Tata 1mg Logo
3.6
 • 12 Interview Questions
Qualcomm Logo
3.8
 • 11 Interview Questions
View all
Recently Viewed
INTERVIEWS
AlmaBetter
No Interviews
CAMPUS PLACEMENT
SRM university (SRMU)
INTERVIEWS
Apex Group
No Interviews
INTERVIEWS
Apex Group
No Interviews
INTERVIEWS
Apex Group
No Interviews
INTERVIEWS
Apex Group
No Interviews
CAMPUS PLACEMENT
Amity University
INTERVIEWS
AlmaBetter
No Interviews
INTERVIEWS
AlmaBetter
No Interviews
INTERVIEWS
Apex Group
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 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