R1.
You are given:
An integer K representing the total number of people that need accommodation.
An array capacity[] where capacity[i] represents the maximum number of people that hotel i can accommodate.
Each hotel can be used at most once, and if a hotel is chosen, any number of people up to its capacity may stay there.
Your objective is:
Minimize the number of hotels used
Among all such solutions, minimize the total capacity used
R2. You are given N jobs. Each job i has:
a unique job ID id[i]
a deadline deadline[i]
a profit profit[i]
Each job takes exactly 1 unit of time to complete.
At any time, only one job can be scheduled.
A job must be completed on or before its deadline to earn its profit.
Your task is to schedule jobs in order to maximize the total profit.
Input
• An integer N, the number of jobs.
• Three arrays of length N:
id[] — job IDs
deadline[] — deadlines of jobs
profit[] — profits of jobs
Output
Return two integers:
The maximum number of jobs that can be scheduled
The maximum total profit obtained
Constraints
1 ≤ N ≤ 10^5
1 ≤ deadline[i] ≤ 10^5
1 ≤ profit[i] ≤ 10^6
R3. https://leetcode.com/problems/maximum-candies-you-can-get-from-boxes/
R4. Technical experience round. Asked questions about how to handle conflicts, failures, challenges, deadlines, complex project, ownership etc
R5. System design: Design a booking platform for Airbnbs avoiding double bookings. It should support creating, modifying and deleting bookings
The interviewer indicated that we need to build search capability as well
Follow up: How would you handle scenario when a major event is happening in an area say a taylor swift concert. If your database is partitioned by zip code, how would you handle hot paritions etc. This question would depend on your approach and might differ
I was able to solve all the 3 coding questions. I didn't do quite as well in the system design round
I have an oppurtunity to take the system design round again. I will update this post after I am done with that round
If I get through the system design round, there will be a values round after this