Hey,
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:
https://www.hackerrank.com/challenges/compare-the-triplets/problem?h_r=next-challenge&h_v=zen
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 [1], [], [1], []
Refer to
https://ibb.co/GCkwM9j for further details.
Can anybody suggest anything?