A coding challenge from my brother, with example of output.
The easiest and most hassle-free way to run this is to simply cut and paste the code into your browser console, change the 'Queries' and 'References' object values at the bottom to whatever is desired, and run it. You can also run the file as a script in your terminal with node by saving the file, navigating to the folder it is contained in, and running node BroChallenge.js
. Please make sure node you have node installed.
On the left is the specification for the problem to solve, and on the right is an example of output in the terminal. Further clarification about the problem is documented in the file itself.