From 10d265e067f26b8a6c2fd1e92381073d41cb2668 Mon Sep 17 00:00:00 2001 From: Tawnos <1546176+Tawnos@users.noreply.github.com> Date: Thu, 18 Dec 2025 18:58:55 -0800 Subject: [PATCH] Fix calculation of 'n' in C# binary tree algorithm Now matches the kotlin implementation. --- bench/algorithm/binarytrees/1.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench/algorithm/binarytrees/1.cs b/bench/algorithm/binarytrees/1.cs index 5e64b0611..ef08d15fd 100644 --- a/bench/algorithm/binarytrees/1.cs +++ b/bench/algorithm/binarytrees/1.cs @@ -61,7 +61,7 @@ public static void Main(string[] args) for (int i = 0; i < nResults; i++) { var depth = i * 2 + MinDepth; - var n = (1 << maxDepth - depth + MinDepth); + var n = 1 << (maxDepth - depth + MinDepth); var check = 0; for (int j = 0; j < n; j++)