AfanasevGad7

This is a task for our favourite professor
git clone git://git.stellar-nexus.ru/AfanasevGad7
Log | Files | Refs | README

commit 6ea01fd6bfe542f8c76ba7010f9a00c48b89fd60
parent 536fdf4640716bb082519e71dd1bde4802ef1d27
Author: Plat <plat@stellar-nexus.ru>
Date:   Fri,  7 Nov 2025 09:37:02 +0000

Fixed avl.c for compilation

Diffstat:
Mavl.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/avl.c b/avl.c @@ -34,9 +34,9 @@ add(Node *root, int val) return init(val); if (val < root->val) - root->left = add(val, root->left); + root->left = add(root->left, val); else if (val > root->val) - root->right = add(val, root->right); + root->right = add(root->right, val); else return root; @@ -126,7 +126,6 @@ balance(Node *root) Node * search(Node *root, int val) { - steps++; if (root->val == val) return root; if (root->val > val) return search(root->left, val);