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), […]

READ MORE

Codility – Count Divisible

Solution to Codility lesson3-exercise1 Count Divisible problem, link to Codility problem and complete solution at the end of the post. Definitions:         Problem: Define a function solution with input A, B and K, such that solution returns the number of integers divisible by K , belonging to the interval [A, B]. Expected worst-case time complexity is […]

READ MORE