/AVLTree

Generic AVL Tree Implementation with operations like : Insertion, Deletion, Search, lower & upper bound, Closest element, values in range etc.

Primary LanguageC++

Problem : AVL Tree AIM :To have end to end knowledge of the balanced binary search tree and how it can be used to solve a wide range of problems efficiently. TASK: Implement AVL Tree with Following Operations. Operations to implement:

Operations Complexity
1. Insertion O(log N)
2. Deletion O(log N)
3. Search O(log N)
4. Count occurrences of element O(log N)
5. lower_bound O(log N)
6. upper_bound O(log N)
7. Closest Element to some value O(log N)
8. K-th largest element O(log N)
9. Count the number of elements in the tree whose values fall into a given range. O(log N)

IMPORTANT POINTS:

  1. Implement it with class or struct. It should be generic.
  2. Duplicates are allowed.