Module for testing and optimizing algorithms in Advent of Code
npm install aoc_testing
- This function checks if your functions returns correct answers
- input → input of puzzle
- sol1 → solution of first part
- sol2 → solution of second part
- func1 → function that returns solution to first part
- func2 → function that returns solution to second part
- Measures, how long it takes for functions to finish
- input → input of puzzle
- func1 → function that returns solution to first part
- func2 → function that returns solution to second part
- times → how many times do you want to run the functions (default value is 1000)
- Prints out solutions
- input → input of puzzle
- func1 → function that returns solution to first part
- func2 → function that returns solution to second part
- Removes '\r' from string array
- arrayToBeCleansed → array to be cleansed from '\r'