Skip to content

Conversation

KameronKeller
Copy link

@KameronKeller KameronKeller commented Apr 5, 2024

What this is:

  • Implements an algorithm for locating the highest region and adds a main function for a sample run of the program
  • models/highestregionlocator.ts
    • Implemented locateHighestRegion() for locating the highest region in an event stream. This algorithm solves this problem with a time complexity of O(n).
  • models/region.ts
    • Removed an inefficient function for adding events to a region
  • index.ts
    • Added function calls for a sample run of the program
  • index.test.ts
    • Added tests for locating the highest scoring region
  • assets/obviousAnswerSampleData.ts
    • This is a sample event stream with an obvious answer useful for validating the algorithm with tests

Issue:

N/A

Media:

Screen.Recording.2024-04-05.at.3.31.58.PM.mov

Steps to Verify:

  • Clone the branch
  • Run yarn install

To run the program:

  • Run yarn dev

To test the program:

  • Run yarn test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant