|
@@ -1,4 +1,4 @@
|
|
|
-import { ArrayIsOnlyDuplicates, LoadInput } from "../common.ts";
|
|
|
+import { SumArray, ArrayIsOnlyDuplicates, LoadInput } from "../common.ts";
|
|
|
import { FindDifferential, ParseInput, type Histogram } from "./9_common.ts";
|
|
|
|
|
|
const tests = [
|
|
@@ -66,7 +66,3 @@ function PredictNextValue(histogram: Histogram): Histogram {
|
|
|
|
|
|
return allDifferentials[0];
|
|
|
}
|
|
|
-
|
|
|
-function SumArray(arr: number[]): number {
|
|
|
- return arr.reduce((accumulator, value) => accumulator += value, 0);
|
|
|
-}
|