Your task is to take a piece of data describing the opening hours of a number of clinics, and provide two functions, one to parse the opening hours data, and one to query the parsed data to find which clinics are open at a specified date and time.
The input file can be assumed to be well-formed and contain no invalid data, and all dates and times can be assumed to be in the same time zone.
A code and test skeleton written in TypeScript is provided to help get you started.
- Ensure you have Node.js v16 or later installed.
- Install packages with
npm install
. - To run the test watcher use
npm run test
. - The recommended IDE is VS Code.
- Using vanilla JavaScript is also an option, but you'll need to change the source file extensions and remove the type annotations.
Example data can be found in the data/example-clinic-opening-hours.ts
file.
Inspect this file to determine the kind of input data that your code should be
able to parse and query.
All the data in data/example-clinic-opening-hours.ts
are correct and valid.
You can use and extend it for testing purposes, or write your own.
The first deliverable is the source code for your solution, as either a public git repository or a zip archive.
The second deliverable is a completed WRITEUP.md
file containing the
following:
- Any instructions needed to boot and test your solution.
- A summary of the solution's design & architecture.
- Technical justification of key design decisions with comparison to other possible approaches.
- Discussion of the scalability of your solution to larger datasets and potential optimization approaches.
- Any areas of the design or implementation that could be improved further or that you would like specific feedback on.
- A simple and straightforward design is preferred. Avoid unnecessary complexity.
- Review the input data for possible edge cases.
- Remove debug or other unnecessary code before submitting.
- Remember the tests.
We provide personalized feedback on submissions, typically two pages in length.
If you're not in contact with us regarding a career opportunity but want to have a go at this test and think you've done a really great job then send your submission to careers@heartlab.com and we'll take a look!
If you have any questions about the task then please be in touch with a member of the HeartLab team and we’ll do our best to help in whatever way we can.
Good luck!
🍀