Solutions for Count Distinct Elements in Array