bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
MediumBit ManipulationLC 318

Maximum Product of Word Lengths

Given a string array words, return the maximum value of length(word[i]) length(word[j]) where the two words do not share common letters. If no such two words exist, return 0.

Asked at 1 company
Google
Hints
  • 1.Think about which data structure fits best
  • 2.Consider the time complexity of your approach
  • 3.Look for patterns in the constraints
LeetCode