Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S system-design-primer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 173
    • Issues 173
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 190
    • Merge requests 190
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Donne Martin
  • system-design-primer
  • Issues
  • #730
Closed
Open
Issue created Jan 10, 2023 by Ilya Sher@ilyash-b

Bus#can_fit_in_spot is semantically incorrect

Location: https://github.com/donnemartin/system-design-primer/blob/master/solutions/object_oriented_design/parking_lot/parking_lot.ipynb

From "Constraints and assumptions"

Bus can park if we have 5 consecutive "large" spots`

But then (class Bus...):

def can_fit_in_spot(self, spot):
    return True if spot.size == LARGE else False

Even if the current code somehow handles this properly (didn't check in depth, doubt) it's a bomb that can go off in the future.

Assignee
Assign to
Time tracking