A self-balancing balancing binary search tree containing n items allows the lookup, insertion, and removal of an item in
O(log n) worst-case time. Since it’s a self balancing BST. We can easily find out minimum element in O(logn) time which is always the leftmost element.
Even in min heap insertion and deletion of an element will take O(logn) time.
But question here is Insertion of an element if it is not already present in the set.
If element is not present in the set heap will take O(n) time to find the element and O(logn) time for insertion.