1. Restaurant Reservation System Design
Design a restaurant reservation system with two core requirements: 1. Based on the user's geographical location and the number of people, query nearby restaurants with available seats and return a list. 2. Allow users to select a restaurant and book a time slot.
2. Minimum Sum Partition with Max Subarray Length
Given an array nums and an integer k, partition the array into subarrays with a maximum length of k. Each subarray should take its maximum value to form a sum. Find the number of partition schemes that result in the minimum sum. For instance, for nums: [1, 5, 3, 4], k: 2, the output is 1, with the minimum sum partition being [1, 5] [3, 4]. The method to solve this problem is dynamic programming.
3. Unique Adjacent Elements in Array
Given an integer array, produce an integer array where adjacent elements are not the same. Return any valid result, or an empty array if no solution exists. For example, given input [1,1,1,2,2,2], a possible output is [1,2,1,2,1,2].
4. Container Loading Problem
Given a container of size 1000 and a set of items with specific sizes, such as 50, 80, 100, find any combination of items that exactly fills the container. The solution should add up to the size of the container. Describe how you would approach this problem, and if you used depth-first search (DFS), explain why and how you implemented it.
5. Meeting Room Scheduling Problem
Given a set of meeting time intervals, determine the minimum number of conference rooms required to accommodate all the meetings. Each interval includes the start and end time of a meeting, and no two meetings can occur in the same room at the same time. Discuss your approach to solving this problem.