It’s your first day at HubSpot, and you’re in charge of writing the logic to send invitations to a special two-day event in each country for HubSpot’s partners in those countries. We need to find the dates that’ll work best based on survey results that partners have sent in and determine how many people can attend. You’re provided with an API that gives you a list of partners, their countries, and which dates they’re available in ISO 8601 format. Another team will send out the invitations, but you need to tell them when we should host the event and who should attend by POSTing to an API. The date you send in for the country should be the starting date of the two day period where the most partners can make it for both days in a row. In case of multiple dates with the same number of partners, pick the earlier date. If there are no two days in a row when any partners can make it, return null.
https://candidate.hubteam.com/candidateTest/v3/problem/dataset?userKey=${USER_KEY}
https://candidate.hubteam.com/candidateTest/v3/problem/result?userKey=${USER_KEY}
- Please have the following installed and upgraded to their respective version or newer
- Node 15.0.1
- checking via
node -v
- checking via
- NPM 7.0.3
- checking via
npm -v
- checking via
- Node 15.0.1
- The project is default running on a testing token acquired by the developer. In the event of any personal usage, please obtain a personal token with HubSpot.
- options on acquiring the project
git clone git@github.com:XingKHuang/hubspot.gitif you wish to clone the project from terminal- download the zip file from https://github.com/XingKHuang/hubspot, then run
tar xvzf hubspot-master.zip > hubspotto decompress the project root directory
- run
cd hubspotto go to the project root directory - run
npm installto install npm module dependencies - run
sudo npm install -gto install the program
valid-participant-search
- run
npm uninstall -g hubspotto uninstall the program cd ..- run
sudo rm -r hubspotto delete the project