You are viewing a single comment's thread. Return to all comments →
if(map2.containsKey(a*r)) count += map2.get(a*r); If above code is moved after long a = arr[i] it will pass all testcases.
Seems like cookies are disabled on this browser, please enable them to open this website
Count Triplets
You are viewing a single comment's thread. Return to all comments →
if(map2.containsKey(a*r)) count += map2.get(a*r); If above code is moved after long a = arr[i] it will pass all testcases.