[x] Tests pass (./test.sh <username> shows no differences between expected and actual outputs)
[x] All formatting changes by the build are committed
[x] Your launch script is named calculate_average_<username>.sh (make sure to match casing of your GH user name) and is executable
[x] Output matches that of calculate_average_baseline.sh
[x] For new entries, or after substantial changes: When implementing custom hash structures, please point to where you deal with hash collisions (126-132)
Execution time: 9s
Execution time of reference implementation: ~3m 4s
Tested on: 6-core i5 @ 3.70GHz
I made a small improvement by replacing the use of hashmap with array to collect the partial results. Hash collisions are resolved by incrementing array's position until "free" slot is found (lines 126-132).
This saves about 2-3 seconds on my machine, but I'm not sure if this will be sufficient to drop below 10s execution time on evaluation machine ( :crossed_fingers: ).
Check List:
[x] Tests pass (
./test.sh <username>
shows no differences between expected and actual outputs)[x] All formatting changes by the build are committed
[x] Your launch script is named
calculate_average_<username>.sh
(make sure to match casing of your GH user name) and is executable[x] Output matches that of
calculate_average_baseline.sh
[x] For new entries, or after substantial changes: When implementing custom hash structures, please point to where you deal with hash collisions (
126-132
)Execution time:
9s
Execution time of reference implementation:
~3m 4s
Tested on:
6-core i5 @ 3.70GHz
I made a small improvement by replacing the use of hashmap with array to collect the partial results. Hash collisions are resolved by incrementing array's position until "free" slot is found (lines 126-132).
This saves about 2-3 seconds on my machine, but I'm not sure if this will be sufficient to drop below 10s execution time on evaluation machine ( :crossed_fingers: ).