INDAPlus21 / INDAPlus21/carlch-task-15

Pass

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Well done Carlle!**

AHHHH! WHAT IS THIS CODE???

```c
static AATree delete(AATree t,
int key) {
if(t == NULL) return NULL;
if(key < t->key) t->left = delete(t->left, key);
else if(key > t->key) t->right = delete(t->right, key);
else
if(t->left == NULL &&
t->right == NULL) { free(t); return NULL; }
if(t->left == NULL) { AATree l;
l = t->right;
while(l->left != NULL)
l = l->left;
t->key = l->key;
t->data = l->data;
t->right = delete(t->right, l->key); }
else { AATree l;
l = t->left;
while(l->left != NULL)
l = l->right;
t->key = l->key;
t->data = l->data;
t->left = delete(t->left, l->key);
}
if(t->left != NULL &&
t->right != NULL) { int lvl = min(t->left->level, t->right->level) + 1;
if(lvl < t->level) { t->level = lvl;
if(t->right != NULL &&
lvl < t->right->level) t->right->level = lvl;
}
}
```

I will not even...

Keep it up!

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue only presents a C delete function and informal criticism; it names no file, test, or requested change. Clarify the intended refactor, then locate the implementation and relevant tests before defining what done means.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
10/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.