Given a sorted array having where all elements are repeated twice but one is repeated thrice, find the element repeated thrice in O(logn) time. Can you help me with the answer?