You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The height calculation during rotations is incorrect. The height should be updated after the rotations, but it’s using the old height values.
The insertion logic does not account for duplicate values. In an AVL tree, typically duplicates are either not allowed or handled in a specific way.
Performance Issues:
The height calculation can be optimized by maintaining the height in the node itself during insertion instead of recalculating it every time.
The populate and populatedSorted methods can be more efficient.
The text was updated successfully, but these errors were encountered:
Logical Errors:
The height calculation during rotations is incorrect. The height should be updated after the rotations, but it’s using the old height values.
The insertion logic does not account for duplicate values. In an AVL tree, typically duplicates are either not allowed or handled in a specific way.
Performance Issues:
The height calculation can be optimized by maintaining the height in the node itself during insertion instead of recalculating it every time.
The populate and populatedSorted methods can be more efficient.
The text was updated successfully, but these errors were encountered: