Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Parking Lot

Problem

Design a simple parking lot

Solution

We can use array to store the status of the parking lot. We just need to keep track of where are the empty spaces. Implemetation Time complexity O(n) and Space O(n)

Parking Array

Stores the data and not meant to be directly used

Parking zone

Uses parking lot to keep user understandable data

How to run

    ./main.rb

Tests

uses Mini tests

    ruby -Ilib:test tests/test_parking_array.rb
    ruby -Ilib:test tests/test_parking_zone.rb

About

Parking lot design

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages