Count Triplets
Problem
You are given an array and you need to find number of tripets of indices (i,j,k)such that the elements at those indices are in geometric progression for a given common ratio r and i less than j less than k .
For example, arr = [1,4,16,64] If r=4 , we have [1,4,16] and [4,16,64] at indices (0,1,2) and (1,2,3).
Github link
https://github.com/RakeshKrishna143/h...
Watch video Count Triplets Hackerrank Solution Python | Hackerrank Solution in Python online without registration, duration hours minute second in high quality. This video was added by user Engineers Revolution 08 February 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,623 once and liked it 22 people.