feat: finish evaluate arg allgorithm

This commit is contained in:
2024-04-15 13:31:32 +02:00
parent d262d4b9fd
commit 9ccd76c7d9
5 changed files with 72 additions and 11 deletions

View File

@ -1,15 +1,16 @@
<script lang="ts">
import { decode, encode } from "$lib/helpers/flat_tree";
const input = [5, [6, 1], [7, 2, [5, 1]]];
// const input = [5, [6, 1], [7, 2, [5, 1]]];
// const input = [5, [], [6, []], []];
// const input = [52];
const input = [0, 0, [0, 2, 0, 128, 0, 128], 0, 128];
console.log("INPUT");
console.log(input);
let encoded = encode(input);
encoded = [0, 3, 5, ...encoded.slice(2).slice(0, -4), 5, 5, 1, 1];
// encoded = [];
console.log("ENCODED");
console.log(encoded);