Hackerrank – Beautiful Triplets
Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I checked each consequent combination of (i, j, k), if it is valid according to condition. There is a catch. I had to stop an iteration if array[j] – array[i]