Minimum Number of Operations to Make Array Empty
Each value is removed in groups of two or three, so a value appearing c times needs ceil(c / 3) operations unless c is 1.
Each value is removed in groups of two or three, so a value appearing c times needs ceil(c / 3) operations unless c is 1.