Codility – Distinct

Solution to Codility lesson4-exercise3 Distinct problem, link to Codility problem and complete solution at the end of the post. Definitions:         Problem: Define a function solution with input A , such that solution returns the number of distinct values in array A. Expected worst-case time complexity is O(N*log(N)); Expected worst-case space complexity is O(N), […]