Hackerrank – Compare The Triplets

Hackerrank – Problem Statement

A description of the problem can be found on Hackerrank.

Solution

Read all ratings and compare it according to the defined conditions:

  • If ai > bi, then Alice is awarded 1 point
  • If ai < bi, then Bob is awarded 1 point
  • If ai = bi, then neither person receives a point

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby

Leave a Reply

Your email address will not be published. Required fields are marked *