# Category: Algorithms

## Codility Max Product Of Three 100% O(n) Solution

Below you can find my 100% solution to one of the Codility Lesson 6 practice challenges. The complexity of my solution is O(n) and passed all scores with 100%. …

## Min Perimeter Rectangle – Codility 100% Correct Javascript Solution

The Min Perimeter Rectangle challenge brings us back to a lot of math. I had a gut feeling on this one and I only checked with a few examples …

## Max Profit Codility – 100% Correct Solution

The Max Profit Codility challenge put me to a solid test in order to find a O(N) solution. In the end I found the following algorithm: I iterated the …

## Max Double Slice Sum – Codility 100% Correct Javascript Solution

The Max Double Slice Sum was a challenging problem to solve in O(N) complexity. I iterated through the array from both sides finding out at each position the maximum …

## Equi Leader Codility – 100% Correct Javascript Solution

The Equi Leader Codility challenge builds on top of the previous Dominator challenge. After we find the leader, we will need to find how many equi leaders there are …

## Dominator Codility – 100% Correct Solution In Javascript

The Dominator Codility Challenge was fun to solve. Its difficulty is marked as easy in Codility and I agree. I used an object to hold the number of occurrences …

## Stone Wall – Codility 100% Correct Javascript Solution

The Stone Wall Codility challenge proved more difficult for me than the rating it is attributed (easy). I still think it’s at least a medium level challenge, at least …

## Count Factors – Codility 100% Correct Javascript Solution

The Count Factors challenge is just the classic finding the division factors of a number. The most efficient way I found was iterating until the square root of the …

## Max Slice Sum – Codility 100% Correct Javascript Solution

The Max Slice Sum was a fun brain challenge. I ended up finding the O(N) complexity solution after using the ol’ pen and paper trials. So, I iterated over …

## Brackets – Codility 100% Correct Solution In Javascript

The Brackets challenge from Codility was a fun exercise. A solution with O(N) complexity requires a single run of the array. At each step, we operate on a stack …