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.
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
Return the count of triplets that form a geometric progression.
