Reputation: 1595
I want to write the algorithm of Balanced Binary Search Tree with backtracking would you please guild me about it? I dont know how should I implement it. I dont want any code I need just explanation.
Upvotes: 1
Views: 332
Reputation: 15234
It sounds like you're looking for a self-balancing binary tree. I recommend red-black trees or AVL trees, which are both pretty straightforward.
There are other binary tree extensions with similar strengths (and possibly easier implementations), so check out the related links at the bottom of those wikipedia articles.
Upvotes: 2