From caba5f1d5aa28fc7298da7d4d118d73691ad4071 Mon Sep 17 00:00:00 2001 From: Arina Dohadailo Date: Thu, 12 Nov 2026 22:48:40 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20u9/huffman=5Ftree.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- u9/huffman_tree.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/u9/huffman_tree.py b/u9/huffman_tree.py index 5c872e4..6884d4b 100644 --- a/u9/huffman_tree.py +++ b/u9/huffman_tree.py @@ -37,15 +37,15 @@ class HuffmanTree: elif nodes[i].frequency < nodes[second].frequency: second = i - left = nodes[first] - right = nodes[second] + left = nodes[first] + right = nodes[second] - new_node = HuffmanNode( - None, - left.frequency + right.frequency, - left, - right - ) + new_node = HuffmanNode( + None, + left.frequency + right.frequency, + left, + right + ) nodes.remove(left) nodes.remove(right)