Cite the shared TreeNode for the AVL node and the C binary tree node (#2037)

Batch 3b of the runnable-snippets plan. avl_tree_node now cites each
language's shared TreeNode in all 13 languages, and the C tree_node_class
shares the same region. Rust gets an import region; Java, C#, Swift and
Kotlin skip their serialization helpers with an adjacent region.

The shared nodes gain reviewed field comments in C++ and Rust, aligned
comments in Java, Swift and Kotlin, and a spacing fix in JavaScript. The
AVL section adds one sentence saying the shared node class already has
height. Four ru Rust files whose multi-line statements had collapsed into
literal \n now compile again. en, ja, ko and zh-hant are regenerated; ru
is synced by hand.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Yudong Jin
2026-11-16 05:51:36 +08:00
committed by GitHub
co-authored by Claude Opus 5.5
parent bcd86fc1ed
commit b113cb425a
100 changed files with 467 additions and 1083 deletions
+2
View File
@@ -7,6 +7,7 @@ Author: krahets ([email protected])
from collections import deque
# [region]{tree_node}
class TreeNode:
"""Класс узла двоичного дерева"""
@@ -15,6 +16,7 @@ class TreeNode:
self.height: int = 0 # Высота узла
self.left: TreeNode | None = None # Ссылка на левый дочерний узел
self.right: TreeNode | None = None # Ссылка на правый дочерний узел
# [endregion]{tree_node}
# Правила кодирования сериализации см.:
# https://www.hello-algo.com/chapter_tree/array_representation_of_tree/