https://github.com/gavincyi/programmingcompetitiontester
A header-only library of a testing machine of generating randomized arrays. For programming competition or coding interview use.
https://github.com/gavincyi/programmingcompetitiontester
programming-challenge programming-contests
Last synced: 8 months ago
JSON representation
A header-only library of a testing machine of generating randomized arrays. For programming competition or coding interview use.
- Host: GitHub
- URL: https://github.com/gavincyi/programmingcompetitiontester
- Owner: gavincyi
- Created: 2017-02-27T13:52:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-28T02:18:26.000Z (almost 9 years ago)
- Last Synced: 2025-02-01T17:24:46.464Z (about 1 year ago)
- Topics: programming-challenge, programming-contests
- Language: C++
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Programming Competition Tester
The project is a header-only library of a testing machine of generating randomized arrays.
The objective of the project is to check the values generated from different algorithms.
1. Generate a random vector.
2. Run the algorithms with the provided test cases.
3. Check if all values from algorithms are the same on randomized arrays.
## Why I start this project?
I participated a few programming contests and coding interviews. I find sometimes
it is not an obstacle to write a solution, but to write good test cases to confirm
the solution correct on
1. Most cases, and
2. The boundary cases.
So I created this project on the way of my coding interview. (But after writing it, I
found I was incorrect on one of the questions in the last 15 minutes. Ironic.) Hope it
can benefit to other developers, especially those participating in coding interview in
Codility. I found most Codility platform coding interviews have only one test case and
you can never ensure you are absolutely correct.
## How to use?
1. First create your own project (quickly during your test/interview/contest/whatever1)
and import the header "TestMachine.hpp".
2. Create the machine by the following initial parameters.
i) minSize, maxSize - The minimum and maximum size of the randomized arrays
ii) minRange, maxRange - The minimum and maximum range of each element in the array
3. Insert your test cases by method "InsertTestCase".
4. Insert your algorithm by method "InsertAlgorithm"
5. Call method Run to run it!
## Questions
If you have any feedback (especially thank-you note if you can win an offer), please email me
by gavincyi at gmail dot com. Good luck and have fun! :)