August 25, 2017

More Codility

More Codility

The 2nd Codility lesson is to search for the odd number of elements in an array that cannot be paired with any other element. Codility provided this example. A[0] = 9, A[1] = 3, A[2] = 9 A[3] = 3, A[4] = 9, A[5] = 7 A[6] = 9 Apart from A[5], every other element has

Learning on Codility

Learning on Codility

Codility is where programmers receive programming tests as interview questions. This is also where programmers could learn to code. I am at lesson 1 on Iterations, and here’s my answer. It finds the binary gap of a number. A binary gap is the longest sequence of 0 of a number converted to binary. For example,