Author: Dan Avramescu
The genomic range query problem can be solved efficiently if we treat the sequances as a string instead of an array. The simplest solution I found is to exatract …
The Perm Check Challenge defines a permutation as a sequence containing each element from 1 to N once, and only once. So the order does not matter. I devised …
The Missing Integer problem in the 4th Codility lesson is marked as medium but I think the solution is pretty straight forward. The complexity of my solution is O(N) …
The Tape Equilibrium problem asks us to find the minimum difference between all the possible splits of an array (the left side minus the right side). It’s a fairly …
This is another simple practice run with a O(n) / O(N * log(N)) solution. Just iterate through the array once and fill an empty array of length N+1 with …
This Forg Jump Codility challenge in lesson 3 is just a simple practice task. A O(1) one-line solution is easy to reach: See the result here: https://app.codility.com/demo/results/trainingB6VKUQ-UST/
The Odd Occurrences in An Array problem is rather simple. You are asked to find the unpaired element in an array. There can be several pairs of the same …
I haven’t ported my portfolio to the new site yet. For now, please find my old work on https://old.danwritescode.com. Some of the images did not survive the migration, I’ll …
This is a Javascript implementation for the Codility Cyclic Rotation in Lesson 2 – Arrays. The challenge is to rotate an array A a number of K times. The …
This is a javascript implementation that renders a 100% correct solution of the Codility Lesson 1 challenge – Binary Gaps. I chose a recursive approach to this, and quite …