I am solving a problem on hackerrank(https://www.hackerrank.com/challenges/compare-the-triplets/problem?h_r=next-challenge&h_v=zen
). The problem states to complete the function
compareTriplets which must return an array of two integers, the first being ALice's score and the secoond being Bob's.
compareTriplets has the following parameter(s):
a: an array of integers representing Alice's challenge rating
b: an array of integers representing Bob's challenge rating
For more detail on the problem, refer to the following link:
For the same challenge i wrote the following solution:
The problem states that the output should be like [1,1] i.e. [points earned by alice, points earned by bob]
But somehow it displays a array with four elements with the values , , , 
Refer to https://ibb.co/GCkwM9j
for further details.
Can anybody suggest anything?