Software Engineers Interview Questions

419,197 software engineers interview questions shared by candidates

Given a set of numbers in an array which represent number of consecutive days of AirBnB reservation requested, as a host, pick the sequence which maximizes the number of days of occupancy, at the same time, leaving atleast 1 day gap in between bookings for cleaning. Problem reduces to finding max-sum of non-consecutive array elements. // [5, 1, 1, 5] => 10 The above array would represent an example booking period as follows - // Dec 1 - 5 // Dec 5 - 6 // Dec 6 - 7 // Dec 7 - 12 The answer would be to pick dec 1-5 (5 days) and then pick dec 7-12 for a total of 10 days of occupancy, at the same time, leaving atleast 1 day gap for cleaning between reservations. Similarly, // [3, 6, 4] => 7 // [4, 10, 3, 1, 5] => 15
avatar

Software Engineer

Interviewed at Airbnb

4
Dec 12, 2015

Given a set of numbers in an array which represent number of consecutive days of AirBnB reservation requested, as a host, pick the sequence which maximizes the number of days of occupancy, at the same time, leaving atleast 1 day gap in between bookings for cleaning. Problem reduces to finding max-sum of non-consecutive array elements. // [5, 1, 1, 5] => 10 The above array would represent an example booking period as follows - // Dec 1 - 5 // Dec 5 - 6 // Dec 6 - 7 // Dec 7 - 12 The answer would be to pick dec 1-5 (5 days) and then pick dec 7-12 for a total of 10 days of occupancy, at the same time, leaving atleast 1 day gap for cleaning between reservations. Similarly, // [3, 6, 4] => 7 // [4, 10, 3, 1, 5] => 15

Write a program to count the number of occurrences of any two vowels in succession in a line of text. For example, in the sentence, “Please read this application and give me gratuity”, such occurrences are ea, ea, io and ui.
avatar

Fresher Software Engineer

Interviewed at GammaStack

3.9
Jun 16, 2019

Write a program to count the number of occurrences of any two vowels in succession in a line of text. For example, in the sentence, “Please read this application and give me gratuity”, such occurrences are ea, ea, io and ui.

Viewing 1101 - 1110 interview questions

Glassdoor has 419,197 interview questions and reports from Software engineers interviews. Prepare for your interview. Get hired. Love your job.