TypeScript solution for Google Hash Code 2021 practice round.
- Install Deno by following these instructions.
- Install the official Deno VSCode extension.
In the project directory, you can run:
Runs the solver program with all the input files.
If you want to run only specific files, you can specify them as last arguments of the command:
deno run --unstable --allow-read=input --allow-write=submission src/solver.ts input/a_example input/b_little_bit_of_everything.inNote: You can also allow all permissions with deno run --unstable -A src/solver.ts input/*
deno run --unstable --allow-read=input,submission,src/optimizers --allow-write=submission src/optimizer.ts input/*
Runs the optimizer program with all the input files to optimize the submission file with the highest score for each input dataset.
If you want to run only specific files, you can specify them as last arguments of the command:
deno run --unstable --allow-read=input,submission,src/optimizers --allow-write=submission src/optimizer.ts input/a_example input/b_little_bit_of_everything.inNote: You can also allow all permissions with deno run --unstable -A src/optimizer.ts input/*
Runs all tests in the current directory and all sub-directories.
Note: You can also allow all permissions with deno test -A
Formats all TypeScript files in the current directory and all sub-directories.
- Go in the
profilingdirectory which contains a web application capable of running the solver web worker. - Run
yarn startin this directory which will open the web application in a new tab of your default web browser. - You can then pick an input dataset file to start running a solver worker with this file.
- Display the browser console to see the console output (info and progress).
- Use the browser profiling development tools to analyse your code performance.