We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Is your function returning a string? If so, this is the issue. The join method expects an array, so you want to be returning something in the format [aScore, bScore].
Then, result.join will convert the array into the expected output format.
This at least worked for me, hope my explanation is of some use to you
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
Is your function returning a string? If so, this is the issue. The join method expects an array, so you want to be returning something in the format [aScore, bScore].
Then, result.join will convert the array into the expected output format.
This at least worked for me, hope my explanation is of some use to you