4ndrelim / data-structures-and-algorithms

This repository contains design and implementation of fundamental data structures and algorithms.
59 stars 18 forks source link

AVL Tree delete return wrong node #83

Closed tckeong closed 5 months ago

tckeong commented 6 months ago

It seems like we need to make the return node become the node after rebalance in the delete function. image

4ndrelim commented 6 months ago

Ah, you're right. Will fix this shortly or feel free to raise a PR. It seems the suite of test cases aren't comprehensive enough, but then agn, testing this requires some set-up.

4ndrelim commented 5 months ago

fixed. turns out the suite of test cases for avl tree wasn't uploaded.. so it missed it. Will look for the source test files and push soon! Thanks for the spot!