Skip to content

Instantly share code, notes, and snippets.

@gkucmierz
Created February 10, 2017 17:24
Show Gist options
  • Select an option

  • Save gkucmierz/9c090111ed34b9a0b74914eead753ae0 to your computer and use it in GitHub Desktop.

Select an option

Save gkucmierz/9c090111ed34b9a0b74914eead753ae0 to your computer and use it in GitHub Desktop.
// https://github.com/houdini22/javascript_test/blob/master/parking_lot_test/test.js
const solution = (e,l) => {
let s = [e,l].map(s => {
let m = s.match(/(\d+):(\d+)/);
return (+m[1])*60+(+m[2]);
});
return Math.ceil((s[1]-s[0])/60)*4+1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment