# Category: Algorithms

## Triangle Codility – 100% Correct Javascript Solution

The Triangle problem is solved once we realize that 3 elements in an array are triplets, then they are somehow close as value (proportionally to how big they are …

## Distinct Codility 100% Correct Javascript Solution

Ok, the Distinct Codility challenge is an easy one and it can be solved in a number of ways. I went for something fun since we do Javascript, so …

## Passing Cars – Codility 100% Correct Javascript Solution

The Passing Cars challenge takes a step back in difficulty but it’s still a fun problem to solve. It can be done with O(N) complexity and it’s fairly easy. …

## Nesting – Codility 100% Correct Javascript Solution

The Nesting – Codility Challenge is a variant of the Brackets algorithm I solved a few days ago. The difference here is that we have fewer types of brackets …

## Codility Max Counters 100% Javascript Solution

Ok the Max Counters problem is the first algo challenge marked as medium in the codility lessons. I devised a O(m+n) solution. We first check if there’s no element …

## Frog River One Codility Problem – Javascript 100% Correct Solution

The Frog River One problem states that a frog can only jump from one side to the other of the river when leaves are placed at each “lane” on …

## Number Of Disc Intersections – Codility 100% Correct Javascript Solution

The Number of Disc Intersections is the hardest challenge so far, at least for me. I had to go seriously out of the box for this one, but in …

## Min Average Slice – Codility 100% Correct Javascript Solution

The Min Average Slice problem gives more of a mathematical challenge than a coding one. The trick here is to figure out that you only need to find the …

## Count Div Codility 100% Correct Javascript Solution

The Count Div problems is classified as a medium difficulty but I found the solution to be quite trivial and easily solvable in O(1). The only thing we need …

## Perm Check Codility 100% Correct Javascript Solution

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 …