Available question text
Count the number of ordered pairs of distinct words (A, B) from a list such that swapping their first letters produces two new words that do not appear in the original list. The challenge is to do this efficiently for up to 5·10^4 words by exploiting the structure of shared suffixes and overlaps among first-letter groups.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2306. Naming a Company
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source