samuels_882's blog

By samuels_882, history, 4 years ago, In English

Given an array A of size n.count the number of pairs such that A[i]*A[j]==A[i]+A[j]. Since the constraint of A[i] is upto 10^9 and N is upto 40,000 , I cannot run the naive technique of running a double loop. Any other way to solve it in one loop?

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it