Could Someone tell the optimal approach

Revision en1, by AJ__20, 2023-06-02 21:52:39

You are given an array of strings A of size N. You need to pick two strings Ai and Aj such that len(Ai)* len(Aj) is maximized. Is there a optimal solution that can be less than order of N*N? Thanks in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English AJ__20 2023-06-04 07:08:06 64
en2 English AJ__20 2023-06-04 06:58:23 170
en1 English AJ__20 2023-06-02 21:52:39 252 Initial revision (published)