The following algorithm takes as input an array, and returns the array with all the duplicate elements removed. For example, if the input array is {1, 3, 3, 2, 4, 2}, the algorithm returns {1, 3, 2, 4}.S = new empty set A = new empty dynamic array for every element x in input array if not S.member(x)then S.insert(x) A.append(x) return A What is the big-O complexity of this algorithm, if the set is implemented as: i. an AVL tree? [2 marks] ii. a harsh table? [2 marks] Briefly explain your answer.