There is already an ethical issue, anyway you look at it. Even if you do not copy paste the answers.
Its not like participants on forums like hackerrank invented those algorithms. Every single data structure and algorithm question asked on sites like hackerrank has solutions invented by some Computer Scientists, participants are just using them.
The only question we are asking from the where do those participants replicate the answers? Do they replicate it from a book? Webpage? Memory? You could replicate the answer from anywhere, as long you didn't invent the data structure or the algorithm you are essentially plagiarizing.
>>HackerRank is a technical recruiting platform.
If you use irrelevant tests to measure capability of the candidates, why cry when they match up to it in their own way?
Writing your own algorithm or data structure implementation from a description of the algorithm is considered fair game in every programming challenge competition I've ever seen. This includes the national level ones like ACM.
Internet points aside, HackerRank is a technical recruiting platform.