Company: Meesho_6aug
Difficulty: medium
Parking Lot Vacancy Finder Problem Description A shopping mall has implemented a smart parking system to track the availability of parking slots in real-time. The parking lot consists of N slots, where each slot is either occupied or vacant at any given time. The system receives an array of size N , where: 1 represents an occupied parking slot. 0 represents a vacant parking slot. When a customer arrives and wants to park their car, the system must determine the nearest available parking slot (i.e., the first occurrence of 0 from the left). If a vacant slot is found, return its position (1-based index) . If all slots are occupied, return -1 to indicate that no parking is available. Function Description You must implement the function findVacantSlot . Parameters: int N → The number of parking slots. vector<int> parkingLot → An array of size N, where each element represents the occupancy of a parking slot (1 for occupied, 0 for vacant). Returns: int → The 1-based inde