Codility – Missing Integer

Solution to Codility lesson2-exercise3 Missing Integer 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 minimal positive integer (greater than 0) that does not belongs to A. Expected worst-case time complexity is O(N); Expected worst-case […]

READ MORE

Codility – Permutation Check

Solution to Codility lesson2-exercise2 Permutation Check problem, link to Codility problem and complete solution at the end of the post. Definitions:         Codility Permutation definition: A permutation of size N is a sequence containing each element from 1 to N once, and only once. Problem: Define a function solution with input A, such that solution […]

READ MORE