Git Product home page Git Product logo

gojek_takehome's Introduction

Synopsis

GoJek TakeHome exercise of Parking Lot. Written in Golang.

Few Decisions made over the Exercise are highlighted as follows :

  1. Since there is not formal try catch mechanism in golang except for panic, recover an Error Wrapper was written which reads the output of function, write the error to stdout and returns it.
  2. For solving the problem, the data structure used for representing parking lot is a mix of Heap and HashMaps to solve all of the commands in optimal manner as possible, assuming space is not an issue. Further details have been added in the comments alongside as to why each struct was used and why.
  3. No external testing library has been used as golang provides internal "testing" library. All test cases have been written using it.
  4. The build process is written in the form a very simple Makefile which formats the code, and then builds and creates a binary according to the system on which it is being built, assuming go is already installed and GOPATH is alo set already and that make process is being called when the current working directory is the path of the root of the project.
  5. the parking_lot shell script has been written which first makes the project, then checks if the build or tests failed.

Run

$ ./parking_lot
test
....

OR

$ ./parking_lot abc.txt
output....

gojek_takehome's People

Contributors

hikermohak avatar

Watchers

James Cloos avatar Andrey derma putra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.