Software Developer 2 Interview Questions

2,525 software developer 2 interview questions shared by candidates

You are very busy every day, so you want to implement a calendar program to help to manage all of your meetings. Any guests can book your time in the calendar, but your time should not be double booked, because you can't join two meetings at the same time. In order to make this question easier to implement, let's use integer to represent the time on your calendar. You will receive a pair of two integers start_time and end_time, the range of the booking time x should be start_time <= x < end_time. Return true if the time slot is bookable (no double booked) and book the time slot, return false if anytime in the time slot is already booked. Example: book(20, 25) => true book(15, 25) => false, because [20, 25) is booked book(10, 20) => true book(11, 12) => false, because [10, 20) is booked book(30, 40) => true
avatar

SDE-2

Interviewed at Flexport

3.6
May 30, 2024

You are very busy every day, so you want to implement a calendar program to help to manage all of your meetings. Any guests can book your time in the calendar, but your time should not be double booked, because you can't join two meetings at the same time. In order to make this question easier to implement, let's use integer to represent the time on your calendar. You will receive a pair of two integers start_time and end_time, the range of the booking time x should be start_time <= x < end_time. Return true if the time slot is bookable (no double booked) and book the time slot, return false if anytime in the time slot is already booked. Example: book(20, 25) => true book(15, 25) => false, because [20, 25) is booked book(10, 20) => true book(11, 12) => false, because [10, 20) is booked book(30, 40) => true

Viewing 901 - 910 interview questions

Glassdoor has 2,525 interview questions and reports from Software developer 2 interviews. Prepare for your interview. Get hired. Love your job.