Worst experience so far. Team lead shared the screen after saying Hi and asked me to implement below requirment in only 40 minutes. 1. **Requirements:**
- Implement a VehicleTracker service with methods to:
- Register a vehicle by VehicleID.
- Update the vehicle's current location (latitude, longitude) and status (e.g., "In Transit," "Idle," "Maintenance").
- Retrieve the location history for a specific vehicle.
- Calculate the distance from a specified vehicle to all other registered vehicles, using their most recent locations.
- Retrieve a vehicle's current status and location.
- Design the classes to store location history by vehicle, with each update timestamped.
2. **Assumptions:**
- The system does not require persistent storage (an in-memory solution is sufficient).
- Implement async/await methods for eventual conversion to a database instead of in-memory storage.
- Assume each vehicle will send location updates periodically.
- Distance calculation can use the Haversine formula for accuracy based on latitude and longitude.
3. **If time permits:**
- Add unit tests for the main functionalities, especially for distance calculations.
- Implement a way to filter location history based on a time range.