Can't understand why this solution for a HackerRank problem is not working
Here is the link to the problem: https://www.hackerrank.com/challenges/count-triplets-1/problem?isFullScreen=true&h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=dictionaries-hashmaps
Here is my solution: (fails for test cases 6 and 10)
I know there are a lot of solutions to this online, but I want to specifically understand why the above solution is not correct. My current assumption is that I've found something nobody else before me has found and it's a HackerRank bug, meaning my code is correct. Would be happy to be proven wrong.
HackerRank
Count Triplets | HackerRank
Return the count of triplets that form a geometric progression.
1 Reply
why on earth would you think you've found a bug?
does your code not actually fail for test cases 6 and 10, when you run it independently?
what are test cases 6 and 10?