Skip to content

Conversation

MrMoneyInTheBank
Copy link

Important

Please make sure the file name is lowercase and a duplicate file does not already exist before merging.

@MrMoneyInTheBank MrMoneyInTheBank changed the title 1603-design-parking-system.py Creat: 1603-design-parking-system.py Jun 12, 2023
@MrMoneyInTheBank MrMoneyInTheBank changed the title Creat: 1603-design-parking-system.py Create: 1603-design-parking-system.py Jun 12, 2023
Copy link
Collaborator

@ethancdaniel ethancdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this reflect the video? Like this submission: https://leetcode.com/problems/design-parking-system/submissions/1019702520/

class ParkingSystem:

    def __init__(self, big: int, medium: int, small: int):
        self.spaces= [big, medium, small]

    def addCar(self, carType: int) -> bool:
        if self.spaces[carType - 1] > 0:
            self.spaces[carType - 1] -= 1
            return True
        return False

# Your ParkingSystem object will be instantiated and called as such:
# obj = ParkingSystem(big, medium, small)
# param_1 = obj.addCar(carType)

@MrMoneyInTheBank MrMoneyInTheBank closed this by deleting the head repository Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants